Commit aec58d82083862642c8b7a546d341a426ef340a9

pionere 2022-02-05T10:56:43

make SDL_strcasecmp standard compliant

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c
index 1f5a120..e23f14a 100644
--- a/src/stdlib/SDL_string.c
+++ b/src/stdlib/SDL_string.c
@@ -1118,8 +1118,8 @@ SDL_strcasecmp(const char *str1, const char *str2)
         ++str1;
         ++str2;
     }
-    a = SDL_toupper(*str1);
-    b = SDL_toupper(*str2);
+    a = SDL_toupper((unsigned char) *str1);
+    b = SDL_toupper((unsigned char) *str2);
     return (int) ((unsigned char) a - (unsigned char) b);
 #endif /* HAVE_STRCASECMP */
 }