commit b98b4e6be6ec33ddeb27cf0a919b2a0b8664a0d9
Author: Simon Howard <fraggle@soulsphere.org>
AuthorDate: Sun Oct 28 02:35:45 2018 -0400
Commit: Simon Howard <fraggle@soulsphere.org>
CommitDate: Sun Oct 28 02:35:45 2018 -0400
misc: Fix bug with M_StringStartsWith().
A full string match still counts as "starting with". This fixes a bug
with substitute MIDI packs where substitutions were not being loaded
when the full hash was specified.
---
src/m_misc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/m_misc.c b/src/m_misc.c
index a9f615cf..17f08f87 100644
--- a/src/m_misc.c
+++ b/src/m_misc.c
@@ -535,7 +535,7 @@ boolean M_StringConcat(char *dest, const char *src, size_t dest_size)
boolean M_StringStartsWith(const char *s, const char *prefix)
{
- return strlen(s) > strlen(prefix)
+ return strlen(s) >= strlen(prefix)
&& strncmp(s, prefix, strlen(prefix)) == 0;
}