--- a/src/string.c Wed Dec 31 15:11:12 2025 +0100 +++ b/src/string.c Wed Dec 31 15:25:30 2025 +0100 @@ -41,7 +41,12 @@ #include <ctype.h> #ifdef _WIN32 -#define cx_strcasecmp_impl _strnicmp +static int cx_fixed_strnicmp(const char* s1, const char* s2, size_t count) { + // Microsoft's implementation crashes when count == 0 and either string is NULL + if (count == 0) return 0; + return _strnicmp(s1, s2, count); +} +#define cx_strcasecmp_impl cx_fixed_strnicmp #else #include <strings.h> #define cx_strcasecmp_impl strncasecmp