summaryrefslogtreecommitdiff
path: root/src/emap
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-01 16:33:38 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-01 16:33:38 +0300
commit036ae997e7dcd368caedd5cd00697f42da9b21bb (patch)
treeed2b35739485260f5a618a109eefb4635424a8d5 /src/emap
parentc5c81196bca1239e075ac434343b13f8c2cfc447 (diff)
downloadevol-hercules-036ae997e7dcd368caedd5cd00697f42da9b21bb.tar.gz
evol-hercules-036ae997e7dcd368caedd5cd00697f42da9b21bb.tar.bz2
evol-hercules-036ae997e7dcd368caedd5cd00697f42da9b21bb.tar.xz
evol-hercules-036ae997e7dcd368caedd5cd00697f42da9b21bb.zip
Fix formatting string issue if parameters too small in size.
Diffstat (limited to 'src/emap')
-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 ++;