shithub: drawterm

Download patch

ref: 5cc6f05c4dba14d250210d121ad4ca68118cd5ef
parent: 4f14409f5630abbb4a96d54e7823da3c7ac08c81
author: Russ Cox <rsc@swtch.com>
date: Tue Dec 9 11:47:22 EST 2008

sprint: the usual gcc "bug"

--- a/libc/sprint.c
+++ b/libc/sprint.c
@@ -14,7 +14,7 @@
 	 * 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);