aboutsummaryrefslogtreecommitdiffstats
path: root/dmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index 6b285df..818313a 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -519,7 +519,7 @@ insert:
return;
cursor = strnlen(sel->text, sizeof text - 1);
memcpy(text, sel->text, cursor);
- text[sizeof text - 1] = '\0';
+ text[cursor] = '\0';
match();
break;
}