fixing sizeof stuff

This commit is contained in:
arg@mig29
2006-11-26 15:49:33 +01:00
parent 26fbf124fa
commit 8c20e5dbd3
2 changed files with 7 additions and 7 deletions

4
draw.c

@ -35,8 +35,8 @@ drawtext(const char *text, unsigned long col[ColLast]) {
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;