diff options
Diffstat (limited to 'textscreen/txt_inputbox.c')
-rw-r--r-- | textscreen/txt_inputbox.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/textscreen/txt_inputbox.c b/textscreen/txt_inputbox.c index b2acaa8b..60512845 100644 --- a/textscreen/txt_inputbox.c +++ b/textscreen/txt_inputbox.c @@ -237,10 +237,11 @@ static int TXT_InputBoxKeyPress(TXT_UNCAST_ARG(inputbox), int key) c = TXT_KEY_TO_UNICODE(key); - if (c >= 128 || isprint(c)) + // Add character to the buffer, but only if it's a printable character + // that we can represent on the screen. + if (isprint(c) + || (c >= 128 && TXT_CanDrawCharacter(c))) { - // Add character to the buffer - AddCharacter(inputbox, c); } |