aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-10-31 22:01:20 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-10-31 22:01:20 +0200
commit1944a636afaf7fd41f8d1d29b0e1b813cbde25a4 (patch)
treedbbfbef63c2ef4c5c015411a27045a0345767023 /awkgram.y
parent7a985e9734fe4517c92c86bc45cfea20129aa482 (diff)
parenta4d313ca20a63d28b7a2020e6897f4e3e04dae6e (diff)
downloadegawk-1944a636afaf7fd41f8d1d29b0e1b813cbde25a4.tar.gz
egawk-1944a636afaf7fd41f8d1d29b0e1b813cbde25a4.tar.bz2
egawk-1944a636afaf7fd41f8d1d29b0e1b813cbde25a4.zip
Merge branch 'master' into feature/typed-regex
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/awkgram.y b/awkgram.y
index 3a3fce31..7fc1f279 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -6302,7 +6302,12 @@ make_profile_number(double d, const char *str, size_t len)
n->stptr = estrdup(str, len + 1);
n->stptr[len] = '\0';
n->stlen = len;
- n->flags |= NUMCONSTSTR;
+ // Set STRCUR and n->stfmt for use when profiling
+ // (i.e., actually running the program) so that
+ // force_string() on this item will work ok.
+ // Thanks and a tip of the hatlo to valgrind.
+ n->flags |= (NUMCONSTSTR|STRCUR);
+ n->stfmt = STFMT_UNUSED;
}
return n;