]> git.armaanb.net Git - dmenu.git/commitdiff
removed the i = textnw... as remarked by Martin Hurton
authorAnselm R Garbe <garbeam@gmail.com>
Mon, 18 Aug 2008 09:17:15 +0000 (10:17 +0100)
committerAnselm R Garbe <garbeam@gmail.com>
Mon, 18 Aug 2008 09:17:15 +0000 (10:17 +0100)
dmenu.c

diff --git a/dmenu.c b/dmenu.c
index a9c0f60f048164fa437619070316f4853f9ecacd..a799f14300e7ad479c682c5c710bccd21ed99a11 100644 (file)
--- a/dmenu.c
+++ b/dmenu.c
@@ -226,7 +226,7 @@ drawtext(const char *text, unsigned long col[ColLast]) {
        y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent;
        x = dc.x + (h / 2);
        /* shorten text if necessary */
-       for(len = MIN(olen, sizeof buf); len && (i = textnw(buf, len)) > dc.w - h; len--);
+       for(len = MIN(olen, sizeof buf); len && textnw(buf, len) > dc.w - h; len--);
        if(!len)
                return;
        memcpy(buf, text, len);