mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-06 15:30:50 +00:00
Make sure we don't pass UTF-8 to SDL_iscntrl()
This function is only valid for values <= 127. Closes https://github.com/libsdl-org/SDL/pull/8637
This commit is contained in:
parent
9a206adbee
commit
1e12d7cfb6
1 changed files with 1 additions and 1 deletions
|
@ -1063,7 +1063,7 @@ int SDL_SendKeyboardText(const char *text)
|
|||
int posted;
|
||||
|
||||
/* Don't post text events for unprintable characters */
|
||||
if (SDL_iscntrl((int)*text)) {
|
||||
if (!(*text & 0x80) && SDL_iscntrl(*text)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue