diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c index 61a429aff..23c85d70d 100644 --- a/src/events/SDL_keyboard.c +++ b/src/events/SDL_keyboard.c @@ -768,7 +768,7 @@ SDL_SendKeyboardText(const char *text) int posted; /* Don't post text events for unprintable characters */ - if (*text < ' ' || *text == 127) { + if ((unsigned char)*text < ' ' || *text == 127) { return 0; }