4 ===================================================================
5 RCS file: /home/ncvs/src/contrib/one-true-awk/lib.c,v
6 retrieving revision 1.1.1.5
7 diff -u -p -u -r1.1.1.5 lib.c
8 --- lib.c 5 Jun 2007 15:33:51 -0000 1.1.1.5
9 +++ lib.c 8 Jun 2007 04:14:51 -0000
10 @@ -40,7 +40,7 @@ char *fields;
11 int fieldssize = RECSIZE;
13 Cell **fldtab; /* pointers to Cells */
14 -char inputFS[10] = " ";
15 +char inputFS[100] = " ";
18 int nfields = MAXFLD; /* last allocated slot for $i */
19 @@ -58,7 +58,7 @@ static Cell dollar1 = { OCELL, CFLD, NUL
20 void recinit(unsigned int n)
22 if ( (record = (char *) malloc(n)) == NULL
23 - || (fields = (char *) malloc(n)) == NULL
24 + || (fields = (char *) malloc(n+1)) == NULL
25 || (fldtab = (Cell **) malloc((nfields+1) * sizeof(Cell *))) == NULL
26 || (fldtab[0] = (Cell *) malloc(sizeof(Cell))) == NULL )
27 FATAL("out of space for $0 and fields");