summaryrefslogtreecommitdiff
path: root/src/emap/utils/formatutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emap/utils/formatutils.c')
-rw-r--r--src/emap/utils/formatutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emap/utils/formatutils.c b/src/emap/utils/formatutils.c
index 312b790..f81a5c0 100644
--- a/src/emap/utils/formatutils.c
+++ b/src/emap/utils/formatutils.c
@@ -107,7 +107,7 @@ int format_sub(struct script_state* st, int translate)
sz += len - 2;
if (sz > 490)
break;
- memmove(tmp + len, tmp + 2, strlen(tmp + 2));
+ memmove(tmp + len, tmp + 2, strlen(tmp + 2) + 1);
memcpy(tmp, item, len);
ptr = tmp + len;
idx ++;