aboutsummaryrefslogtreecommitdiffstats
path: root/field.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-05-30 17:36:36 -0400
committerArnold D. Robbins <arnold@skeeve.com>2016-05-30 17:36:36 -0400
commite4d6c384015c654abf99e6d79b0d7d1e6150baed (patch)
treef59673b841bab61e98257f8f105a7e257304fca3 /field.c
parentc8dc9ceead1f322acc3d1041cab02a61536d9f3d (diff)
parentb835790d438d6d3c3433c0f24ca03046d808d077 (diff)
downloadegawk-e4d6c384015c654abf99e6d79b0d7d1e6150baed.tar.gz
egawk-e4d6c384015c654abf99e6d79b0d7d1e6150baed.tar.bz2
egawk-e4d6c384015c654abf99e6d79b0d7d1e6150baed.zip
Merge branch 'master' into feature/cmake
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;