aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2014-03-10 20:09:51 +0100
committerThomas White <taw@bitwiz.org.uk>2014-03-10 20:09:51 +0100
commit65d9edef292567e4ed31859bd191af5cee274d92 (patch)
tree9422f7910d5b6cca774a4c38d74cb03dab2c86f3
parentcc2502e38dc93057cadf271614eea1ca3794ad13 (diff)
Fix writing of reindexed stream
-rw-r--r--src/ambigator.c6
1 files changed, 3 insertions, 3 deletions
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 );