aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-10-31 22:00:47 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-10-31 22:00:47 +0200
commit25204a8fa9c1ea218de1dded3e2a70a5b2aa0021 (patch)
tree44952ccc886e40f62d029b96258b7fb089c01125 /awkgram.c
parent867c0f3a5a40edea730139a0acf6920ba0e660c9 (diff)
parenta4d313ca20a63d28b7a2020e6897f4e3e04dae6e (diff)
downloadegawk-25204a8fa9c1ea218de1dded3e2a70a5b2aa0021.tar.gz
egawk-25204a8fa9c1ea218de1dded3e2a70a5b2aa0021.tar.bz2
egawk-25204a8fa9c1ea218de1dded3e2a70a5b2aa0021.zip
Merge branch 'master' into feature/cmake
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/awkgram.c b/awkgram.c
index 0ad0fac8..78839fe9 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -8619,7 +8619,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;