diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-06-05 12:25:15 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-06-05 12:25:15 +0300 |
commit | 754cf93645ad3a0061bbd434618a667ac6110121 (patch) | |
tree | 66ffa0701847685c50924d1020fdd4786ef7dbc5 | |
parent | 1107437dceb036a21745779d911539cc273bb094 (diff) | |
download | one-true-awk-754cf93645ad3a0061bbd434618a667ac6110121.tar.gz |
In fldbld(), check that inputFS is set.
-rw-r--r-- | FIXES | 5 | ||||
-rw-r--r-- | lib.c | 2 | ||||
-rw-r--r-- | main.c | 2 |
3 files changed, 8 insertions, 1 deletions
@@ -25,6 +25,11 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +June 5, 2020: + In fldbld(), make sure that inputFS is set before trying to + use it. Thanks to Steffen Nurpmeso <steffen@sdaoden.eu> + for the report. + May 5, 2020: Fix checks for compilers that can handle noreturn. Thanks to GitHub user enh-google for pointing it out. Closes Issue #79. @@ -332,6 +332,8 @@ void fldbld(void) /* create fields from current record */ } fr = fields; i = 0; /* number of fields accumulated here */ + if (inputFS == NULL) /* make sure we have a copy of FS */ + savefs(); if (strlen(inputFS) > 1) { /* it's a regular expression */ i = refldbld(r, inputFS); } else if ((sep = *inputFS) == ' ') { /* default whitespace */ @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20200515"; +const char *version = "version 20200605"; #define DEBUG #include <stdio.h> |