sprint: the usual gcc "bug"

This commit is contained in:
Russ Cox 2008-12-09 16:47:22 +00:00
parent 4f14409f56
commit 5cc6f05c4d
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ sprint(char *buf, char *fmt, ...)
* on PowerPC, the stack is near the top of memory, so * on PowerPC, the stack is near the top of memory, so
* we must be sure not to overflow a 32-bit pointer. * we must be sure not to overflow a 32-bit pointer.
*/ */
if(buf+len < buf) if((uintptr)buf+len < (uintptr)buf)
len = -(uintptr)buf-1; len = -(uintptr)buf-1;
va_start(args, fmt); va_start(args, fmt);