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 diff
1.1 --- a/draw.c Sun Nov 26 13:31:36 2006 +0100 1.2 +++ b/draw.c Sun Nov 26 14:26:53 2006 +0100 1.3 @@ -43,8 +43,8 @@ 1.4 return; 1.5 w = 0; 1.6 olen = len = strlen(text); 1.7 - if(len >= sizeof(buf)) 1.8 - len = sizeof(buf) - 1; 1.9 + if(len >= sizeof buf) 1.10 + len = sizeof buf - 1; 1.11 memcpy(buf, text, len); 1.12 buf[len] = 0; 1.13 h = dc.font.ascent + dc.font.descent;