aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-10-20 21:23:24 -0700
committerThomas White <taw@physics.org>2012-02-22 15:27:03 +0100
commitb326c7d0d308849ef291814eab5cf2923220f4ff (patch)
tree2c105c2ce3efb7cac4b4fcbbfc9f03f1969739ae
parentfd96653b66ec76d90f91f2650bee4ee4c261606f (diff)
Don't re-count the last reflection when loading
-rw-r--r--src/reflections.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/reflections.c b/src/reflections.c
index 70b2744c..b26d9528 100644
--- a/src/reflections.c
+++ b/src/reflections.c
@@ -129,6 +129,7 @@ ReflItemList *read_reflections(const char *filename,
int cts;
rval = fgets(line, 1023, fh);
+ if ( rval == NULL ) continue;
r = sscanf(line, "%i %i %i %f %s %f %f %i",
&h, &k, &l, &intensity, phs, &sigma, &res, &cts);
if ( r >= 8 ) {