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:
Warner Losh 2019-06-03 05:25:22 +00:00
parent 31d232c2a3
commit d9e8cf281b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348527

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));