xim: check for corner cases
This commit is contained in:
parent
c8f0a37638
commit
24565608cb
6
dmenu.c
6
dmenu.c
|
@ -230,11 +230,13 @@ insert(const char *str, ssize_t n) {
|
|||
void
|
||||
keypress(XKeyEvent *ev) {
|
||||
char buf[32];
|
||||
KeySym ksym;
|
||||
int len;
|
||||
KeySym ksym = NoSymbol;
|
||||
Status status;
|
||||
|
||||
len = XmbLookupString(xic, ev, buf, sizeof(buf), &ksym, &status);
|
||||
len = XmbLookupString(xic, ev, buf, sizeof buf, &ksym, &status);
|
||||
if(status == XBufferOverflow)
|
||||
return;
|
||||
if(ev->state & ControlMask) {
|
||||
KeySym lower, upper;
|
||||
|
||||
|
|
Loading…
Reference in a new issue