From b800a1d1366c2ba22b7c934f7527de0b1542fe78 Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Sun, 23 Jun 2013 21:53:09 +0200 Subject: applied Jochen's drw_text patch, thanks --- drw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drw.c b/drw.c index bc4ac41..b130405 100644 --- a/drw.c +++ b/drw.c @@ -157,7 +157,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, const char *tex 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; -- cgit v1.2.3-13-gbd6f