commit - 33a74489f036600bb80a3c34fcdf10e5f9dafae1
commit + b800a1d1366c2ba22b7c934f7527de0b1542fe78
blob - bc4ac41da655288058589860241ac5d31d44ba1f
blob + b13040565f6c01bec3f5927cbf7fcd30409f7c3d
--- drw.c
+++ drw.c
ty = y + (h / 2) - (th / 2) + drw->font->ascent;
tx = x + (h / 2);
/* shorten text if necessary */
- for(len = MIN(olen, sizeof buf); len && tex.w > w - tex.h; len--)
+ for(len = MIN(olen, sizeof buf); len && (tex.w > w - tex.h || w < tex.h); len--)
drw_font_getexts(drw->font, text, len, &tex);
if(!len)
return;