aboutsummaryrefslogtreecommitdiffstats
path: root/gawkapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'gawkapi.h')
-rw-r--r--gawkapi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gawkapi.h b/gawkapi.h
index 3604e906..c5bb1ea9 100644
--- a/gawkapi.h
+++ b/gawkapi.h
@@ -827,7 +827,7 @@ r_make_string(const gawk_api_t *api, /* needed for emalloc */
result->str_value.len = length;
if (duplicate) {
- emalloc(cp, char *, length + 2, "r_make_string");
+ emalloc(cp, char *, length + 1, "r_make_string");
memcpy(cp, string, length);
cp[length] = '\0';
result->str_value.str = cp;