Another partial revert of r301289.

In this case, a change was made in one-true-awk from *FS to
getsval(fsloc) in a line just after one of the lines that had the 0 ->
NULL change. It works both ways as far as I can tell.  It looks like a
bug fix, but I've not tried to track down which ancient version of
one-true-awk it was in (github starts too late for tracking this
down). Before and after the changes the regression suite is passes
100% relative to the un-modified one-true-awk.
This commit is contained in:
imp 2019-06-03 05:25:22 +00:00
parent a3ee27127e
commit c7cdb4a807

View File

@ -1267,7 +1267,7 @@ Cell *split(Node **a, int nnn) /* split(a[0], a[1], a[2]); a[3] is type */
origs = s = strdup(getsval(y));
arg3type = ptoi(a[3]);
if (a[2] == NULL) /* fs string */
fs = *FS;
fs = getsval(fsloc);
else if (arg3type == STRING) { /* split(str,arr,"string") */
x = execute(a[2]);
origfs = fs = strdup(getsval(x));