aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/input-legacy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/input-legacy.c b/ui/input-legacy.c
index 7159747404..a5f1e829c3 100644
--- a/ui/input-legacy.c
+++ b/ui/input-legacy.c
@@ -61,7 +61,7 @@ int index_from_key(const char *key, size_t key_length)
{
int i;
- for (i = 0; QKeyCode_lookup[i] != NULL; i++) {
+ for (i = 0; i < Q_KEY_CODE__MAX; i++) {
if (!strncmp(key, QKeyCode_lookup[i], key_length) &&
!QKeyCode_lookup[i][key_length]) {
break;