From fa1ac94178cf976d4c8dae9a4dc8703303a62d4b Mon Sep 17 00:00:00 2001 From: Ivan Pascal Date: Mon, 2 Oct 2006 02:17:14 +0300 Subject: xkb: fix wrapping when switching between groups Use XkbCharToInt as that's what we're doing. --- xkb/xkbUtils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index ee0abbeae..26ff35e89 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -754,12 +754,12 @@ unsigned char grp; grp= state->locked_group; - if (grp>=ctrls->num_groups || grp < 0) - state->locked_group= XkbAdjustGroup(grp,ctrls); + if (grp>=ctrls->num_groups) + state->locked_group= XkbAdjustGroup(XkbCharToInt(grp),ctrls); grp= state->locked_group+state->base_group+state->latched_group; - if (grp>=ctrls->num_groups || grp < 0) - state->group= XkbAdjustGroup(grp,ctrls); + if (grp>=ctrls->num_groups) + state->group= XkbAdjustGroup(XkbCharToInt(grp),ctrls); else state->group= grp; XkbComputeCompatState(xkbi); return; -- cgit v1.2.3