aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index efc1e54..c25dc82 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -392,7 +392,8 @@ keypress(XKeyEvent *ev) {
392 case XK_Tab: 392 case XK_Tab:
393 if(!sel) 393 if(!sel)
394 return; 394 return;
395 strncpy(text, sel->text, sizeof text); 395 strncpy(text, sel->text, sizeof text - 1);
396 text[sizeof text - 1] = '\0';
396 cursor = strlen(text); 397 cursor = strlen(text);
397 match(); 398 match();
398 break; 399 break;