From 737ea397f8ce4c9b7bcb26a9057a42051f413942 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 2 Mar 2015 15:29:37 +0100 Subject: Avoid duplication of last line of geometry file in stream --- libcrystfel/src/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcrystfel') 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); -- cgit v1.2.3