Skip to content

Commit

Permalink
applied Jochen's drw_text patch, thanks
Browse files Browse the repository at this point in the history
  • Loading branch information
garbeam committed Jun 23, 2013
1 parent 33a7448 commit b800a1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b800a1d

Please sign in to comment.