summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorviper viper@31f1291d-b8d6-0310-a050-a5561fc1590b <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-27 23:01:06 +0000
committerviper viper@31f1291d-b8d6-0310-a050-a5561fc1590b <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-27 23:01:06 +0000
commitf840b91765fd56e055b037b4323e3f7eab0d01b9 (patch)
tree5a61b34b4297b75bf3b18b0c1303a34fa42aefde /src
parent8276596a6b64012b51f4c8b70c4145b1941e1202 (diff)
BUILD : 1.7.22 (1454) BUGS : NOTES : Applied patch by w00t to fix math bug in strnrepl().
git-svn-id: svn://svn.anope.org/anope/trunk@1454 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1168 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc.c b/src/misc.c
index 633efd63b..68c470192 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -160,7 +160,7 @@ char *strnrepl(char *s, int32 size, const char *old, const char *new)
if (diff > avail)
break;
if (diff != 0)
- memmove(ptr + oldlen + diff, ptr + oldlen, left + 1);
+ memmove(ptr + oldlen + diff, ptr + oldlen, left + 1 - oldlen);
strncpy(ptr, new, newlen);
ptr += newlen;
left -= oldlen;