[hackers] [dmenu] fix input text matching || Quentin Rameau

From: <git_AT_suckless.org>
Date: Sun, 4 Oct 2015 15:05:26 +0200 (CEST)

commit 09d0a36e0370f7ca9bdb171bf93c5ac3131c5a92
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Sun Oct 4 14:47:52 2015 +0200
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Sun Oct 4 15:04:59 2015 +0200

    fix input text matching
    
    just compare the size of the input string

diff --git a/dmenu.c b/dmenu.c
index c9fb38b..4f22ffe 100644
--- a/dmenu.c
+++ b/dmenu.c
_AT_@ -219,7 +219,7 @@ match(void)
         len = tokc ? strlen(tokv[0]) : 0;
 
         matches = lprefix = lsubstr = matchend = prefixend = substrend = NULL;
- textsize = strlen(text) + 1;
+ textsize = strlen(text);
         for (item = items; item && item->text; item++) {
                 for (i = 0; i < tokc; i++)
                         if (!fstrstr(item->text, tokv[i]))
Received on Sun Oct 04 2015 - 15:05:26 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 04 2015 - 15:12:10 CEST