From 1150c74c0b7c52c31a6aaaadb896a90c0552aea4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 11 Sep 2024 14:37:34 +0200 Subject: [PATCH] dialogs/TextInputDialog: add 0xff limit to characters This prevents unhandled special keys to be added to the value. --- src/dialogs/TextInputDialog.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dialogs/TextInputDialog.cxx b/src/dialogs/TextInputDialog.cxx index 35fa9a7c..49ddcb88 100644 --- a/src/dialogs/TextInputDialog.cxx +++ b/src/dialogs/TextInputDialog.cxx @@ -358,7 +358,7 @@ TextInputDialog::OnKey(const Window window, int key) /* ignore char */ break; default: - if (key >= 32) + if (key >= 32 && key <= 0xff) InsertByte(window, key); else if (fragile) { Cancel();