aboutsummaryrefslogtreecommitdiffstats
path: root/field.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-05-30 17:36:27 -0400
committerArnold D. Robbins <arnold@skeeve.com>2016-05-30 17:36:27 -0400
commitb835790d438d6d3c3433c0f24ca03046d808d077 (patch)
tree9dca960aa88cf8c3573ae634a9c2333b40feff51 /field.c
parentd851540e8611be939ac01a4f6c87ade351d6ad0b (diff)
parentce211fb7fcf1463619d2b2ef32b8f6c2f4f35459 (diff)
downloadegawk-b835790d438d6d3c3433c0f24ca03046d808d077.tar.gz
egawk-b835790d438d6d3c3433c0f24ca03046d808d077.tar.bz2
egawk-b835790d438d6d3c3433c0f24ca03046d808d077.zip
Merge branch 'gawk-4.1-stable'
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;