diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-05-01 01:36:14 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-05-01 01:36:14 +0200 |
commit | 1afa200c3d5d8f907a67c71c03bc3fd07d838276 (patch) | |
tree | 4cd7a82039af2a0bb2bec82da2e57b8680ed73af /console-client/xkb | |
parent | 0992a61cafb0f3def3b6997f7c3670a4474f479b (diff) |
Fix console hang on unknown key press
* console-client/xkb/kstoucs.c (find_ucs): Remove middle value from
recursive call range.
Diffstat (limited to 'console-client/xkb')
-rw-r--r-- | console-client/xkb/kstoucs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/console-client/xkb/kstoucs.c b/console-client/xkb/kstoucs.c index b4602e17..e93cc858 100644 --- a/console-client/xkb/kstoucs.c +++ b/console-client/xkb/kstoucs.c @@ -34,9 +34,9 @@ unsigned int doit (int keysym) return 0; /* base case: empty search space. */ /* recursive cases: halve search space. */ else if (middle->keysym < keysym) - return find_ucs (keysym, middle, last); + return find_ucs (keysym, middle+1, last); else if (middle->keysym > keysym) - return find_ucs (keysym, first, middle); + return find_ucs (keysym, first, middle-1); } #define NUM_KEYSYMS (sizeof kstoucs_map / sizeof(struct ksmap)) |