Module Name:    othersrc
Committed By:   agc
Date:           Sat Jun  1 22:22:30 UTC 2013

Modified Files:
        othersrc/external/historical/eawk/dist: tran.c

Log Message:
sync with a bugfix in awk sources - check we don't have a NULL value when
setting a string value


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 othersrc/external/historical/eawk/dist/tran.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/historical/eawk/dist/tran.c
diff -u othersrc/external/historical/eawk/dist/tran.c:1.2 othersrc/external/historical/eawk/dist/tran.c:1.3
--- othersrc/external/historical/eawk/dist/tran.c:1.2	Fri May 31 05:56:36 2013
+++ othersrc/external/historical/eawk/dist/tran.c	Sat Jun  1 22:22:30 2013
@@ -529,7 +529,8 @@ eawk_setsvalN(eawk_t *eawk, awkcell_t *c
 		eawk->donefld = 0;	/* mark $1... invalid */
 		eawk->donerec = 1;
 	}
-	t = eawk_tostringN(eawk, s, size);	/* in case it's self-assign */
+	/* in case it's self-assign */
+	t = (s) ? eawk_tostringN(eawk, s, size) : eawk_tostringN(eawk, "", 1);
 	cell->binsize = (uint32_t)size;
 	cell->type &= ~EAWK_NUM;
 	cell->type |= EAWK_STR;

Reply via email to