Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
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 bd53ed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/events/SDL_keyboard.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit bd53ed5

Please sign in to comment.