changeset 4567:1d7ea8724f4a

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.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 22 Jul 2010 22:09:04 -0700
parents 40c833d951a1
children 25b9cd8bdc30
files src/events/SDL_keyboard.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/events/SDL_keyboard.c	Wed Jul 21 21:53:41 2010 -0700
+++ b/src/events/SDL_keyboard.c	Thu Jul 22 22:09:04 2010 -0700
@@ -768,7 +768,7 @@
     int posted;
 
     /* Don't post text events for unprintable characters */
-    if (*text < ' ' || *text == 127) {
+    if ((unsigned char)*text < ' ' || *text == 127) {
         return 0;
     }