From 65d9edef292567e4ed31859bd191af5cee274d92 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 10 Mar 2014 20:09:51 +0100 Subject: Fix writing of reindexed stream --- src/ambigator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ambigator.c b/src/ambigator.c index 69439a24..77f23e8c 100644 --- a/src/ambigator.c +++ b/src/ambigator.c @@ -621,7 +621,7 @@ static void reindex_reflections(FILE *fh, FILE *ofh, int assignment, rval = fgets(line, 1023, fh); if ( rval == NULL ) break; - if ( strcmp(line, REFLECTION_END_MARKER) == 0 ) { + if ( strcmp(line, REFLECTION_END_MARKER"\n") == 0 ) { fputs(line, ofh); return; } @@ -675,10 +675,10 @@ static void write_reindexed_stream(const char *infile, const char *outfile, rval = fgets(line, 1023, fh); if ( rval == NULL ) break; + fputs(line, ofh); + if ( strcmp(line, REFLECTION_START_MARKER"\n") == 0 ) { reindex_reflections(fh, ofh, assignments[i++], amb); - } else { - fputs(line, ofh); } } while ( 1 ); -- cgit v1.2.3