diff options
author | Hyleus <31997281+Hyleus@users.noreply.github.com> | 2018-01-09 19:31:36 +0100 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2018-01-09 19:31:36 +0100 |
commit | 6d261b4e7af3109169edd9ceaeeb5751a01a9596 (patch) | |
tree | 2c8047531626da4c35eea0981773cc4fc7fe65e0 | |
parent | 9707ca9b8fc386354a7966f4584a5f7fdbd41e9c (diff) |
Fix a potential uninitialized variable
-rw-r--r-- | main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -575,9 +575,12 @@ void on_keypress(XKeyEvent *kev) kev->state &= ~ShiftMask; XLookupString(kev, &key, 1, &shksym, NULL); kev->state |= ShiftMask; + XLookupString(kev, &key, 1, &ksym, NULL); + sh = ksym != shksym ? ShiftMask : 0; + } else { + XLookupString(kev, &key, 1, &ksym, NULL); + sh = 0; } - XLookupString(kev, &key, 1, &ksym, NULL); - sh = (kev->state & ShiftMask) && ksym != shksym ? ShiftMask : 0; if (IsModifierKey(ksym)) return; |