commit 056bd10f6e6206fcb875e8601572e54ed216d4f1
Author: Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Mon Oct 6 19:54:28 2014 +0200
Commit: Fabian Greffrath <fabian@greffrath.com>
CommitDate: Mon Oct 6 19:54:28 2014 +0200
terminate the destination string in M_StringReplace()
fixes #428
---
src/m_misc.c | 2 ++
1 file changed, 2 insertions(+)
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;
}