diff options
author | 2006-11-04 19:10:15 +0000 | |
---|---|---|
committer | 2006-11-04 19:10:15 +0000 | |
commit | 4eb91dac4ca5c91e8121a6a0ffae34172183b093 (patch) | |
tree | 4fe53c62cbd8089a0e93b59cafc755a132ed8d85 | |
parent | regen (diff) | |
download | wireguard-openbsd-4eb91dac4ca5c91e8121a6a0ffae34172183b093.tar.xz wireguard-openbsd-4eb91dac4ca5c91e8121a6a0ffae34172183b093.zip |
from ru@freebsd:
Fix a bug converting a variable from the numeric type to a string.
ok otto deraadt
-rw-r--r-- | usr.bin/awk/tran.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/awk/tran.c b/usr.bin/awk/tran.c index 288288637ce..b8e42a75c6f 100644 --- a/usr.bin/awk/tran.c +++ b/usr.bin/awk/tran.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tran.c,v 1.13 2005/04/15 15:54:26 millert Exp $ */ +/* $OpenBSD: tran.c,v 1.14 2006/11/04 19:10:15 jmc Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -333,10 +333,10 @@ char *setsval(Cell *vp, const char *s) /* set string val of a Cell */ donerec = 1; } t = tostring(s); /* in case it's self-assign */ - vp->tval &= ~NUM; - vp->tval |= STR; if (freeable(vp)) xfree(vp->sval); + vp->tval &= ~NUM; + vp->tval |= STR; vp->tval &= ~DONTFREE; dprintf( ("setsval %p: %s = \"%s (%p) \", t=%o r,f=%d,%d\n", vp, NN(vp->nval), t,t, vp->tval, donerec, donefld) ); |