projects
/
suckless
/
dmenu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
528d39b
)
fix a regression in the previous commit for tab complete
author
Hiltjo Posthuma
<hiltjo@codemadness.org>
Fri, 2 Sep 2022 17:09:50 +0000
(19:09 +0200)
committer
Hiltjo Posthuma
<hiltjo@codemadness.org>
Fri, 2 Sep 2022 17:09:50 +0000
(19:09 +0200)
Reported by Santtu Lakkala <inz@inz.fi>, thanks!
dmenu.c
patch
|
blob
|
history
diff --git
a/dmenu.c
b/dmenu.c
index 6b285df1cc5e66febdabc4f4997db298737ce419..818313aafd0fbdf7c56060b1e78daf023e3a5271 100644
(file)
--- 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;
}