Commit 528c05d5 authored by Sam Lantinga's avatar Sam Lantinga

Fixed bug 1014

Don't send events for unprintable characters
parent b72ceb7a
...@@ -764,6 +764,11 @@ SDL_SendKeyboardText(const char *text) ...@@ -764,6 +764,11 @@ SDL_SendKeyboardText(const char *text)
SDL_Keyboard *keyboard = &SDL_keyboard; SDL_Keyboard *keyboard = &SDL_keyboard;
int posted; int posted;
/* Don't post text events for unprintable characters */
if (*text < ' ') {
return 0;
}
/* Post the event, if desired */ /* Post the event, if desired */
posted = 0; posted = 0;
if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) { if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment