Skip to content

Commit

Permalink
dialogs/TextInputDialog: add 0xff limit to characters
Browse files Browse the repository at this point in the history
This prevents unhandled special keys to be added to the value.
  • Loading branch information
MaxKellermann committed Sep 11, 2024
1 parent cec104c commit 1150c74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dialogs/TextInputDialog.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1150c74

Please sign in to comment.