Usermode/libc - Fixed libc from assuming 32-bit pointer size
authorJohn Hodge <[email protected]>
Thu, 20 Oct 2011 04:01:26 +0000 (12:01 +0800)
committerJohn Hodge <[email protected]>
Thu, 20 Oct 2011 04:01:26 +0000 (12:01 +0800)
Usermode/Libraries/libc.so_src/fileIO.c

index 5b479aa..d807a93 100644 (file)
@@ -427,7 +427,7 @@ EXPORT int vsnprintf(char *buf, size_t __maxlen, const char *format, va_list arg
                        _addchar('*');\r
                        _addchar('0');\r
                        _addchar('x');\r
-                       arg = va_arg(args, uint32_t);\r
+                       arg = va_arg(args, intptr_t);\r
                        itoa(tmp, arg, 16, minSize, pad, 0);\r
                        precision = -1;\r
                        goto sprintf_puts;\r
@@ -457,8 +457,7 @@ EXPORT int vsnprintf(char *buf, size_t __maxlen, const char *format, va_list arg
 \r
                // String\r
                case 's':\r
-                       arg = va_arg(args, uint32_t);\r
-                       p = (void*)(intptr_t)arg;\r
+                       p = va_arg(args, char*);\r
                sprintf_puts:\r
                        if(!p)  p = "(null)";\r
                        //_SysDebug("vsnprintf: p = '%s'", p);\r

UCC git Repository :: git.ucc.asn.au