diff --git a/dmenu.c b/dmenu.c index 0293dac..4f485ce 100644 --- a/dmenu.c +++ b/dmenu.c @@ -503,8 +503,9 @@ keypress(XKeyEvent *ev) switch(ksym) { default: insert: - if (!iscntrl(*buf)) - insert(buf, len); + if (iscntrl((unsigned char)*buf)) + return; + insert(buf, len); break; case XK_Delete: case XK_KP_Delete: