diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2014-12-14 10:27:32 -0500 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2014-12-14 10:27:32 -0500 |
commit | b6ac928a53d146233741fc5f7fe1cac66de27303 (patch) | |
tree | 7f0b7cee663f4ddde269079d0d565ffbf39ec2a8 /builtin.c | |
parent | 0d52289482d468c8566976d77c0c6a6a4e602add (diff) | |
download | egawk-b6ac928a53d146233741fc5f7fe1cac66de27303.tar.gz egawk-b6ac928a53d146233741fc5f7fe1cac66de27303.tar.bz2 egawk-b6ac928a53d146233741fc5f7fe1cac66de27303.zip |
Stop allocating an extra wasted byte at the end of various strings.
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1833,7 +1833,7 @@ do_substr(int nargs) * way to do things. */ memset(& mbs, 0, sizeof(mbs)); - emalloc(substr, char *, (length * gawk_mb_cur_max) + 2, "do_substr"); + emalloc(substr, char *, (length * gawk_mb_cur_max) + 1, "do_substr"); wp = t1->wstptr + indx; for (cp = substr; length > 0; length--) { result = wcrtomb(cp, *wp, & mbs); |