From 056bd10f6e6206fcb875e8601572e54ed216d4f1 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Mon, 6 Oct 2014 19:54:28 +0200 Subject: terminate the destination string in M_StringReplace() fixes #428--- src/m_misc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/m_misc.c b/src/m_misc.c index fca26f85..8fa526dc 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -342,6 +342,8 @@ char *M_StringReplace(const char *haystack, const char *needle, } } + *dst = '\0'; + return result; } -- cgit v1.2.3