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.
This commit is contained in:
Sam Lantinga
2010-07-22 22:09:04 -07:00
parent 0d26fd147e
commit 1aea85be53

View File

@@ -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;
}