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

Commit

Permalink
Fixed bug 1014
Browse files Browse the repository at this point in the history
Don't send events for unprintable characters
  • Loading branch information
slouken committed Jul 18, 2010
1 parent a1e3927 commit ca69f38
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/events/SDL_keyboard.c
Expand Up @@ -764,6 +764,11 @@ SDL_SendKeyboardText(const char *text)
SDL_Keyboard *keyboard = &SDL_keyboard;
int posted;

/* Don't post text events for unprintable characters */
if (*text < ' ') {
return 0;
}

/* Post the event, if desired */
posted = 0;
if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) {
Expand Down

0 comments on commit ca69f38

Please sign in to comment.