From f840b91765fd56e055b037b4323e3f7eab0d01b9 Mon Sep 17 00:00:00 2001 From: "viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sat, 27 Sep 2008 23:01:06 +0000 Subject: 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 --- src/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit