Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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.
  • Loading branch information
slouken committed Jul 23, 2010
1 parent cf7b054 commit bd53ed5803005beb3b88a22d87e8d26a3d66197e
Showing with 1 addition and 1 deletion.
  1. +1 −1 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;
}

0 comments on commit bd53ed5

Please sign in to comment.