summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFabian Greffrath2014-10-06 19:54:28 +0200
committerFabian Greffrath2014-10-06 19:54:28 +0200
commit056bd10f6e6206fcb875e8601572e54ed216d4f1 (patch)
tree6c7687b86ddf0ff1e2a8bbd5d4d13bbc470dd088 /src
parenta43186b2beaab5fda826fe846d252fa6186d835a (diff)
downloadchocolate-doom-056bd10f6e6206fcb875e8601572e54ed216d4f1.tar.gz
chocolate-doom-056bd10f6e6206fcb875e8601572e54ed216d4f1.tar.bz2
chocolate-doom-056bd10f6e6206fcb875e8601572e54ed216d4f1.zip
terminate the destination string in M_StringReplace()
fixes #428
Diffstat (limited to 'src')
-rw-r--r--src/m_misc.c2
1 files changed, 2 insertions, 0 deletions
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;
}