From: John Hodge Date: Thu, 20 Oct 2011 04:01:26 +0000 (+0800) Subject: Usermode/libc - Fixed libc from assuming 32-bit pointer size X-Git-Tag: rel0.13~28 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=1744f539d08e6f95e5a4b10ec1fcb6a217dfb4a7;p=tpg%2Facess2.git Usermode/libc - Fixed libc from assuming 32-bit pointer size --- diff --git a/Usermode/Libraries/libc.so_src/fileIO.c b/Usermode/Libraries/libc.so_src/fileIO.c index 5b479aaa..d807a938 100644 --- a/Usermode/Libraries/libc.so_src/fileIO.c +++ b/Usermode/Libraries/libc.so_src/fileIO.c @@ -427,7 +427,7 @@ EXPORT int vsnprintf(char *buf, size_t __maxlen, const char *format, va_list arg _addchar('*'); _addchar('0'); _addchar('x'); - arg = va_arg(args, uint32_t); + arg = va_arg(args, intptr_t); itoa(tmp, arg, 16, minSize, pad, 0); precision = -1; goto sprintf_puts; @@ -457,8 +457,7 @@ EXPORT int vsnprintf(char *buf, size_t __maxlen, const char *format, va_list arg // String case 's': - arg = va_arg(args, uint32_t); - p = (void*)(intptr_t)arg; + p = va_arg(args, char*); sprintf_puts: if(!p) p = "(null)"; //_SysDebug("vsnprintf: p = '%s'", p);