aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2019-06-03 05:25:22 +0000
committerWarner Losh <imp@FreeBSD.org>2021-07-10 17:11:15 +0000
commitffc35739bac49abe823182f61e36162d25e06fe4 (patch)
tree72c2b87ce448b469cf6d25555e4e8da5b60a3bc0
parent0ca88d56418731b16dd81d096bdbf3b88de90b68 (diff)
downloadsrc-ffc35739bac49abe823182f61e36162d25e06fe4.tar.gz
src-ffc35739bac49abe823182f61e36162d25e06fe4.zip
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)
-rw-r--r--contrib/one-true-awk/run.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c
index 1859263f7f4b..baea06ed2500 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));