diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-02-02 15:58:37 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-02-02 15:58:37 +0200 |
commit | f562da9f76aece5cf0692fef03e0b3713249a652 (patch) | |
tree | bc1662e9772865d5492ef2077593af49a45cc55f /awkgram.c | |
parent | b45b98219070df9ba833e3ccc66b1c5bfdc1ebf9 (diff) | |
parent | f0b9ec9b838045318bcc8512c48dd93c66d4eef5 (diff) | |
download | egawk-f562da9f76aece5cf0692fef03e0b3713249a652.tar.gz egawk-f562da9f76aece5cf0692fef03e0b3713249a652.tar.bz2 egawk-f562da9f76aece5cf0692fef03e0b3713249a652.zip |
Merge branch 'master' into feature/stringfix
Diffstat (limited to 'awkgram.c')
-rw-r--r-- | awkgram.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -8712,9 +8712,9 @@ static NODE * set_profile_text(NODE *n, const char *str, size_t len) { if (do_pretty_print) { - // extra byte in case need to add minus sign in negate_num - // and another one for the \0 at the end - n->stptr = estrdup(str, len + 2); + // extra byte in case we need to add minus sign in negate_num + // note that estrdup adds another byte for the \0 at the end + n->stptr = estrdup(str, len + 1); n->stptr[len] = '\0'; n->stlen = len; // Set STRCUR and n->stfmt for use when profiling |