Fix a simple mistake with pattern space, and add a test for it

This commit is contained in:
Glenn L McGrath committed 2003-09-15 12:07:48 +00:00
1 parent 47e5ca1ecb
commit 977451ef44
2 files changed
+15 -2

No files matched your search

+2 -2
View File
@@ -1070,9 +1070,9 @@ static void process_file(FILE * file)
}
pattern_space = xrealloc(pattern_space, pattern_space_size + hold_space_size);
if (pattern_space_size == 2) {
strcat(pattern_space, "\n");
} else {
strcpy(pattern_space, "\n");
} else {
strcat(pattern_space, "\n");
}
if (hold_space) {
strcat(pattern_space, hold_space);