summaryrefslogtreecommitdiff
path: root/xkb/xkmread.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-04-25 19:54:29 +0300
committerDaniel Stone <daniel@fooishbar.org>2009-01-22 15:08:57 +1100
commitfeb757f384382c7782ceac55f99d54c7caadbd9d (patch)
tree550c2383f9e2dd668d05495f20aea02b2e1ecaf8 /xkb/xkmread.c
parentb5f49382fe48f0a762d9a15fb10a7d7e1183fc8d (diff)
XKB: Sanitise vmods for redirected keys
Turn two unsigned chars into one unsigned int for both vmods and the vmod mask. As a bonus, remove broken unused accessor macro for setting the vmods. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb/xkmread.c')
-rw-r--r--xkb/xkmread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index e4d3d4d9c..a6fdc6faf 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -512,10 +512,10 @@ XkbAction *act;
act->redirect.new_key = wire.actionData[0];
act->redirect.mods_mask = wire.actionData[1];
act->redirect.mods = wire.actionData[2];
- act->redirect.vmods_mask0 = wire.actionData[3];
- act->redirect.vmods_mask1 = wire.actionData[4];
- act->redirect.vmods0 = wire.actionData[4];
- act->redirect.vmods1 = wire.actionData[5];
+ act->redirect.vmods_mask = (wire.actionData[3] << 8) | \
+ wire.actionData[4];
+ act->redirect.vmods = (wire.actionData[5] << 8) | \
+ wire.actionData[6];
break;
case XkbSA_DeviceValuator:
act->devval.device = wire.actionData[0];