diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-05-30 17:35:37 -0400 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-05-30 17:35:37 -0400 |
commit | ce211fb7fcf1463619d2b2ef32b8f6c2f4f35459 (patch) | |
tree | d835cda9fece2f754accb20f3879e75439f28d31 /field.c | |
parent | db17f0d20a03bd851e8e4f005eb6304ad6a93c12 (diff) | |
download | egawk-ce211fb7fcf1463619d2b2ef32b8f6c2f4f35459.tar.gz egawk-ce211fb7fcf1463619d2b2ef32b8f6c2f4f35459.tar.bz2 egawk-ce211fb7fcf1463619d2b2ef32b8f6c2f4f35459.zip |
Allow FS = "\0" if RS = "".
Diffstat (limited to 'field.c')
-rw-r--r-- | field.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1270,8 +1270,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 { if (do_posix) |