diff options
| author | onetrueawk <bwkster@gmail.com> | 2019-01-21 14:12:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-21 14:12:05 -0500 |
| commit | f70e36869ea55f9c19d328d4e910fa6a8d77d6da (patch) | |
| tree | 13bfbb578a289a0d97b0b7801f9d811c942b0abf | |
| parent | 55d20ec4e198c05b57fcba14e8f07ca8d65748b8 (diff) | |
| parent | 7580235939d2c4f300827b9444675f35341a00e0 (diff) | |
| download | platform_external_one-true-awk-f70e36869ea55f9c19d328d4e910fa6a8d77d6da.tar.gz platform_external_one-true-awk-f70e36869ea55f9c19d328d4e910fa6a8d77d6da.tar.bz2 platform_external_one-true-awk-f70e36869ea55f9c19d328d4e910fa6a8d77d6da.zip | |
Merge pull request #24 from melloc/fields-init
Fix initial "fields" buffer size
| -rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -59,7 +59,7 @@ void recinit(unsigned int n) { if ( (record = (char *) malloc(n)) == NULL || (fields = (char *) malloc(n+1)) == NULL - || (fldtab = (Cell **) malloc((nfields+1) * sizeof(Cell *))) == NULL + || (fldtab = (Cell **) malloc((nfields+2) * sizeof(Cell *))) == NULL || (fldtab[0] = (Cell *) malloc(sizeof(Cell))) == NULL ) FATAL("out of space for $0 and fields"); *fldtab[0] = dollar0; |
