From ffc35739bac49abe823182f61e36162d25e06fe4 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 3 Jun 2019 05:25:22 +0000 Subject: [PATCH] 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. (cherry picked from commit d9e8cf281b12ca943d150b29ae5a847b0df888f3) --- contrib/one-true-awk/run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c index 1859263f7f4..baea06ed250 100644 --- a/contrib/one-true-awk/run.c +++ b/contrib/one-true-awk/run.c @@ -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)); -- 2.45.0