Index: contrib/one-true-awk/lib.c =================================================================== --- contrib/one-true-awk/lib.c +++ contrib/one-true-awk/lib.c @@ -62,6 +62,7 @@ || (fldtab = (Cell **) malloc((nfields+1) * sizeof(Cell *))) == NULL || (fldtab[0] = (Cell *) malloc(sizeof(Cell))) == NULL ) FATAL("out of space for $0 and fields"); + *record = '\0'; *fldtab[0] = dollar0; fldtab[0]->sval = record; fldtab[0]->nval = tostring("0"); @@ -616,7 +617,7 @@ static int been_here = 0; extern char ebuf[], *ep; - if (compile_time == 2 || compile_time == 0 || been_here++ > 0) + if (compile_time == 2 || compile_time == 0 || been_here++ > 0 || ebuf == ep) return; p = ep - 1; if (p > ebuf && *p == '\n') Index: contrib/one-true-awk/run.c =================================================================== --- contrib/one-true-awk/run.c +++ contrib/one-true-awk/run.c @@ -918,7 +918,7 @@ break; case 'c': if (isnum(x)) { - if (getfval(x)) + if ((int)getfval(x)) sprintf(p, fmt, (int) getfval(x)); else { *p++ = '\0'; /* explicit null byte */