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

Fixed bug 1014

Don't send events for unprintable characters
  • Loading branch information
slouken committed Jul 18, 2010
1 parent a1e3927 commit ca69f38b3154a8ed9c2a6e2e1b972b4677474e52
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/events/SDL_keyboard.c
@@ -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) {

0 comments on commit ca69f38

Please sign in to comment.