aboutsummaryrefslogtreecommitdiffstats
path: root/field.c
diff options
context:
space:
mode:
Diffstat (limited to 'field.c')
-rw-r--r--field.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/field.c b/field.c
index 9012e9de..6a9516d0 100644
--- a/field.c
+++ b/field.c
@@ -1196,8 +1196,12 @@ choose_fs_function:
} else if (fs->stptr[0] == '\\') {
/* yet another special case */
strcpy(buf, "[\\\\\n]");
- } else if (fs->stptr[0] != '\n')
+ } else if (fs->stptr[0] == '\0') {
+ /* and yet another special case */
+ strcpy(buf, "[\\000\n]");
+ } else if (fs->stptr[0] != '\n') {
sprintf(buf, "[%c\n]", fs->stptr[0]);
+ }
}
} else {
parse_field = def_parse_field;