diff options
author | Cody Peter Mello <melloc@writev.io> | 2018-11-12 10:34:19 -0800 |
---|---|---|
committer | Cody Peter Mello <melloc@writev.io> | 2018-11-12 10:34:19 -0800 |
commit | 7580235939d2c4f300827b9444675f35341a00e0 (patch) | |
tree | 1ca92d7c5586c9e95f21d8ae46f1a11a1b85d887 /lib.c | |
parent | 2dc7e5ff1a4feeeb549f32706cf34e17aba89192 (diff) | |
download | one-true-awk-7580235939d2c4f300827b9444675f35341a00e0.tar.gz |
Fix initial "fields" buffer size
Diffstat (limited to 'lib.c')
-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; |