Fix a potential uninitialized variable

This commit is contained in:
Hyleus 2018-01-09 19:31:36 +01:00 committed by Bert Münnich
parent 9707ca9b8f
commit 6d261b4e7a
1 changed files with 5 additions and 2 deletions

7
main.c
View File

@ -575,9 +575,12 @@ void on_keypress(XKeyEvent *kev)
kev->state &= ~ShiftMask; kev->state &= ~ShiftMask;
XLookupString(kev, &key, 1, &shksym, NULL); XLookupString(kev, &key, 1, &shksym, NULL);
kev->state |= ShiftMask; kev->state |= ShiftMask;
}
XLookupString(kev, &key, 1, &ksym, NULL); XLookupString(kev, &key, 1, &ksym, NULL);
sh = (kev->state & ShiftMask) && ksym != shksym ? ShiftMask : 0; sh = ksym != shksym ? ShiftMask : 0;
} else {
XLookupString(kev, &key, 1, &ksym, NULL);
sh = 0;
}
if (IsModifierKey(ksym)) if (IsModifierKey(ksym))
return; return;