[hackers] [libsl] applied Jochen's drw_text patch, thanks || Anselm R Garbe

From: <git_AT_suckless.org>
Date: Sun, 23 Jun 2013 21:54:08 +0200

commit 4970af0a78c1b28ff0cc8bfd36ac7cc03ad208f3
Author: Anselm R Garbe <anselm_AT_garbe.us>
Date: Sun Jun 23 21:54:02 2013 +0200

    applied Jochen's drw_text patch, thanks

diff --git a/drw.c b/drw.c
index bc4ac41..b130405 100644
--- a/drw.c
+++ b/drw.c
_AT_@ -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;
Received on Sun Jun 23 2013 - 21:54:08 CEST

This archive was generated by hypermail 2.3.0 : Sun Jun 23 2013 - 22:00:17 CEST