sprint: the usual gcc "bug"

This commit is contained in:
Russ Cox 2008-12-09 16:47:22 +00:00
parent 4f14409f56
commit 5cc6f05c4d

View File

@ -14,7 +14,7 @@ sprint(char *buf, char *fmt, ...)
* on PowerPC, the stack is near the top of memory, so
* 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;
va_start(args, fmt);