aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-03-02 15:29:37 +0100
committerThomas White <taw@physics.org>2015-03-02 15:30:04 +0100
commit737ea397f8ce4c9b7bcb26a9057a42051f413942 (patch)
tree91f2eaada1515c7cd942dd4562e1787eaf3004b7 /libcrystfel
parentc7ce42aa2390c063d121025b272603989a315fda (diff)
Avoid duplication of last line of geometry file in stream
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 118cd782..18e9eddc 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -1499,7 +1499,7 @@ void write_geometry_file(Stream *st, const char *geom_filename) {
do {
rval = fgets(line, 1023, geom_fh);
- fputs(line, st->fh);
+ if ( rval != NULL ) fputs(line, st->fh);
} while ( rval != NULL );
fclose(geom_fh);