aboutsummaryrefslogtreecommitdiff
path: root/lib.c
diff options
context:
space:
mode:
authoronetrueawk <bwkster@gmail.com>2019-01-21 14:17:57 -0500
committerGitHub <noreply@github.com>2019-01-21 14:17:57 -0500
commit10da9373405927e79f0dbb57499e1efe0d7b2df8 (patch)
tree1235f41e62ddc9cf25afa2b7d63de9aae936b713 /lib.c
parent11c1fc61d58763492995d433942a0586cef0fcd4 (diff)
parent905d26010499d090ba9dac06cdd876f1ea2887e0 (diff)
downloadone-true-awk-10da9373405927e79f0dbb57499e1efe0d7b2df8.tar.gz
Merge branch 'master' into subsep
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 4b1527e..f09aeb2 100644
--- a/lib.c
+++ b/lib.c
@@ -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;