mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Unprintable ascii text (numbers 0-31 and 127 in decimal) is no longer sent to the unicode argument of love.keypressed
This commit is contained in:
@@ -103,7 +103,8 @@ Message *Event::convert(SDL_Event &e)
|
||||
txt = "unknown";
|
||||
arg1 = new Variant(txt, strlen(txt));
|
||||
txt = convertUnicode(e.key.keysym.unicode);
|
||||
if (txt)
|
||||
// We don't want to send unprintable unicode text.
|
||||
if (txt && (txt[0] >= ' ' && txt[0] != 127))
|
||||
{
|
||||
arg2 = new Variant(txt, strlen(txt));
|
||||
msg = new Message("keypressed", arg1, arg2);
|
||||
|
||||
Reference in New Issue
Block a user