final version -- Gottox verified it using the test driver
authorarg@suckless.org
Mon, 09 Jun 2008 11:24:33 +0200
changeset 1259 f0c900871c87
parent 1258 d646e1098d44
child 1260 2d3d08d2dd19
final version -- Gottox verified it using the test driver
dwm.c
--- a/dwm.c	Mon Jun 09 11:05:20 2008 +0200
+++ b/dwm.c	Mon Jun 09 11:24:33 2008 +0200
@@ -571,7 +571,7 @@
 	if(!len)
 		return;
 	if(len < olen)
-		for(i = len; i >= MAX(0, len - 3); buf[i--] = '.');
+		for(i = len; i && i > len - 3; buf[--i] = '.');
 	XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]);
 	if(dc.font.set)
 		XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);