diff --git a/Quake/common.c b/Quake/common.c index 49c5a05ae..78f4af4fa 100644 --- a/Quake/common.c +++ b/Quake/common.c @@ -308,6 +308,9 @@ char *q_strcasestr(const char *haystack, const char *needle) { const size_t len = strlen(needle); + if (!len) + return (char *)haystack; + while (*haystack) { if (!q_strncasecmp(haystack, needle, len))