aboutsummaryrefslogtreecommitdiff
path: root/vis-menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis-menu.c')
-rw-r--r--vis-menu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vis-menu.c b/vis-menu.c
index a316240..00ba9d5 100644
--- a/vis-menu.c
+++ b/vis-menu.c
@@ -458,7 +458,7 @@ run(void) {
return EXIT_FAILURE;
case CONTROL('M'): /* Return */
case CONTROL('J'):
- if (sel) strncpy(text, sel->text, sizeof text); /* Complete the input first, when hitting return */
+ if (sel) strncpy(text, sel->text, sizeof(text)-1); /* Complete the input first, when hitting return */
cursor = strlen(text);
match();
drawmenu();