aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-02-05 12:21:23 +0100
committerThomas White <taw@physics.org>2010-02-05 12:21:23 +0100
commit938bb822a1e8f203d891c2eff43044e881ec17f9 (patch)
tree9b47050b568db7ea2011fddcb48202cf74fc4821
parent82170d86b63a439c5857402bf5b15d27739f25b0 (diff)
Fix counting of simulated images so that it works
-rw-r--r--src/pattern_sim.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index 433a7589..889d8e9d 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -306,7 +306,9 @@ int main(int argc, char *argv[])
free(image.sfacs);
free(image.twotheta);
- if ( n_images && (number >= n_images) ) done = 1;
+ number++;
+
+ if ( n_images && (number > n_images) ) done = 1;
} while ( !done );