Mercurial > dwm-meillo
diff draw.c @ 581:601842ee4484
applied Jukka's sizeof K&R compliance patch, applied Manuels' last-line printage proposal for stdin reading.
author | arg@mig29 |
---|---|
date | Sun, 26 Nov 2006 14:26:53 +0100 |
parents | 427708bf5f36 |
children | 7a48d1f06223 |
line wrap: on
line diff
--- a/draw.c Sun Nov 26 13:31:36 2006 +0100 +++ b/draw.c Sun Nov 26 14:26:53 2006 +0100 @@ -43,8 +43,8 @@ return; w = 0; olen = len = strlen(text); - if(len >= sizeof(buf)) - len = sizeof(buf) - 1; + if(len >= sizeof buf) + len = sizeof buf - 1; memcpy(buf, text, len); buf[len] = 0; h = dc.font.ascent + dc.font.descent;