summaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dmenu.c b/dmenu.c
index 2afcc48..bf74edb 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -477,11 +477,11 @@ kpress(XKeyEvent * e) {
calcoffsets();
break;
case XK_Return:
- if((e->state & ShiftMask) && text)
+ if((e->state & ShiftMask) && *text)
fprintf(stdout, "%s", text);
else if(sel)
fprintf(stdout, "%s", sel->text);
- else if(text)
+ else if(*text)
fprintf(stdout, "%s", text);
fflush(stdout);
running = False;