diff --git a/dmenubar/dmenu.c b/dmenubar/dmenu.c index 1cfefcd..d605ab4 100644 --- a/dmenubar/dmenu.c +++ b/dmenubar/dmenu.c @@ -228,7 +228,7 @@ match(void) len = tokc ? strlen(tokv[0]) : 0; matches = lprefix = lsubstr = matchend = prefixend = substrend = NULL; - textsize = strlen(text); + textsize = strlen(text) + 1; for (item = items; item && item->text; item++) { for (i = 0; i < tokc; i++) if (!fstrstr(item->text, tokv[i]))