summaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2022-09-02 19:09:50 +0200
committerrafa_99 <raroma09@gmail.com>2022-09-03 13:37:45 +0100
commit1798c92a6bd11210d02bea6dc361dd781f017f88 (patch)
tree012afe408d1781f110bd40ad4bb35c4c35c104fc /dmenu.c
parent8b25660bb929374465f601f78a48972af9fec707 (diff)
fix a regression in the previous commit for tab complete
Reported by Santtu Lakkala <inz@inz.fi>, thanks!
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 5932598..89bbfbe 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -526,7 +526,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;
}