From 8f720cc6670287f3dc8e001fd7373042cb85e875 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 28 Feb 2009 04:58:18 +0000 Subject: Make sure %zd treats negative arguments properly on 32-bit platforms. Fix harmless but related bugs in %_$zd and %_$tu. PR: 131880 MFC after: 1 week --- lib/libc/stdio/vfwprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/stdio/vfwprintf.c') diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c index 054299a..2aa4972 100644 --- a/lib/libc/stdio/vfwprintf.c +++ b/lib/libc/stdio/vfwprintf.c @@ -479,7 +479,7 @@ __vfwprintf(FILE *fp, const wchar_t *fmt0, va_list ap) #define INTMAX_SIZE (INTMAXT|SIZET|PTRDIFFT|LLONGINT) #define SJARG() \ (flags&INTMAXT ? GETARG(intmax_t) : \ - flags&SIZET ? (intmax_t)GETARG(size_t) : \ + flags&SIZET ? (intmax_t)GETARG(ssize_t) : \ flags&PTRDIFFT ? (intmax_t)GETARG(ptrdiff_t) : \ (intmax_t)GETARG(long long)) #define UJARG() \ -- cgit v1.1