Commit 47d3e96b43b49ce3d499695230c8531838cfa153

Ozkan Sezer 2021-12-18T14:01:02

SDL_joystick.c: (unsigned char) cast to SDL_tolower() parameters.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index cfcad61..fe6128c 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -1713,7 +1713,7 @@ PrefixMatch(const char *a, const char *b)
 {
     int matchlen = 0;
     while (*a && *b) {
-        if (SDL_tolower(*a++) == SDL_tolower(*b++)) {
+        if (SDL_tolower((unsigned char) *a++) == SDL_tolower((unsigned char) *b++)) {
             ++matchlen;
         } else {
             break;