diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-12-10 09:19:41 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-12-10 09:19:41 +0100 |
commit | e93d22ef184a65418d2cf61268abb616a2752f1f (patch) | |
tree | 48163d4cd919264a39daa71e68ac891e06365f46 /sys/src/cmd/awk | |
parent | 6e4554b7d503404f5af8da020de1125c69a20ce8 (diff) |
awk: fix the fix
be more carefull. have to preserve DONTFREE flag!
Diffstat (limited to 'sys/src/cmd/awk')
-rw-r--r-- | sys/src/cmd/awk/run.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/awk/run.c b/sys/src/cmd/awk/run.c index 86498f197..a8c03f1b5 100644 --- a/sys/src/cmd/awk/run.c +++ b/sys/src/cmd/awk/run.c @@ -1213,9 +1213,10 @@ Cell *split(Node **a, int nnn) /* split(a[0], a[1], a[2]); a[3] is type */ FATAL("illegal type of split"); sep = *fs; ap = execute(a[1]); /* array name */ + n = y->tval; y->tval |= DONTFREE; /* split(a[x], a); */ freesymtab(ap); - y->tval &= ~DONTFREE; + y->tval = n; dprintf( ("split: s=|%s|, a=%s, sep=|%s|\n", s, ap->nval, fs) ); ap->tval &= ~STR; ap->tval |= ARR; |