From bd53ed5803005beb3b88a22d87e8d26a3d66197e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 22 Jul 2010 22:09:04 -0700 Subject: [PATCH] Daniel Wyatt to slouken I also found a bug in the non-printable character fix. In SDL_keyboard.c:SDL_SendKeyboardText: if (*text < ' ' || *text == 127) { needs to be: if ((unsigned char)*text < ' ' || *text == 127) { Otherwise bytes >= 128 will be considered non-printable. --- src/events/SDL_keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }