aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dmenu.c b/dmenu.c
index 085dc29..19f6385 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -415,8 +415,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: