summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
Diffstat (limited to 'riscos')
-rw-r--r--riscos/window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/riscos/window.c b/riscos/window.c
index 33b5993a1..f31c112ea 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -1624,7 +1624,10 @@ bool ro_gui_window_keypress(struct gui_window *g, int key, bool toolbar)
else if (c == 398) c = 31; /* Down */
else if (c == 399) c = 30; /* Up */
if (c < 256) {
- if (alphabet != 111 /* UTF8 */ && ucstable != NULL)
+ if ((wchar_t)key > 256)
+ /* do nothing */;
+ else if (alphabet != 111 /* UTF8 */ &&
+ ucstable != NULL)
/* read UCS4 value out of table */
c = ucstable[c] == -1 ? 0xFFFD : ucstable[c];
else if (alphabet == 111 /* UTF8 */) {