diff --git a/include/util.h b/include/util.h index 00a94a3..e431c2c 100644 --- a/include/util.h +++ b/include/util.h @@ -182,12 +182,13 @@ utilSafeFree(void* p) bool utilCStrMatch(const char* str1, const char* str2) { - assert(str1 != nullptr && str2 != nullptr); + if (!str1 || !str2) + return false; + u32 l1 = strlen(str1); u32 l2 = strlen(str2); - return (l1 == l2) - && (strncmp(str1, str2, l1) == 0); + return (l1 == l2 && strncmp(str1, str2, l1) == 0); } #endif