awk: fix the fix

be more carefull. have to preserve DONTFREE flag!
This commit is contained in:
cinap_lenrek 2012-12-10 09:19:41 +01:00
parent 6e4554b7d5
commit e93d22ef18

View file

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