X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=dwm.c;h=dcd6e317b89ad081ad2aa167cfd500b364594759;hp=265ffb9a371ed61ad5f15b419b29152672d46f71;hb=087a55f8d35f72560c5a266ee0eb91417e6f58fc;hpb=6d7285fd6e40508c35eadfdcc2b8940953cac06d diff --git a/dwm.c b/dwm.c index 265ffb9..dcd6e31 100644 --- a/dwm.c +++ b/dwm.c @@ -581,7 +581,7 @@ drawtext(const char *text, unsigned long col[ColLast], Bool invert) { 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);