diff options
author | Keith Marshall <keithmarshall@@users.sf.net> | 2009-07-29 11:22:51 +0400 |
---|---|---|
committer | Keith Marshall <keithmarshall@@users.sf.net> | 2009-07-29 11:22:51 +0400 |
commit | 0c27cfc9b03ab2578b77e35abb8034831276d8de (patch) | |
tree | 6b8e7281e783edd9d3aed5b9073eba6fdc40ae88 /winsup/mingw/mingwex | |
parent | 7a92f0348cd0b21de4f46dd369f20c520fe4439b (diff) |
Correct disposition of wchar_t output in printf().
Diffstat (limited to 'winsup/mingw/mingwex')
-rw-r--r-- | winsup/mingw/mingwex/stdio/pformat.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/winsup/mingw/mingwex/stdio/pformat.c b/winsup/mingw/mingwex/stdio/pformat.c index 4b6ebcb5a..a59d5130f 100644 --- a/winsup/mingw/mingwex/stdio/pformat.c +++ b/winsup/mingw/mingwex/stdio/pformat.c @@ -734,8 +734,7 @@ char *__pformat_cvt( int mode, __pformat_fpreg_t x, int nd, int *dp, int *sign ) * his `__gdtoa()' function in a manner to provide extended precision * replacements for `ecvt()' and `fcvt()'. */ - int k; - unsigned int e = 0; char *ep; + int k; unsigned int e = 0; char *ep; static FPI fpi = { 64, 1-16383-64+1, 32766-16383-64+1, FPI_Round_near, 0 }; /* Classify the argument into an appropriate `__gdtoa()' category... @@ -1882,8 +1881,8 @@ int __pformat( int flags, void *dest, int max, const char *fmt, va_list argv ) /* considering any `long' type modifier as a reference to * `wchar_t' data, (which is promoted to an `int' argument)... */ - argval.__pformat_ullong_t = (wchar_t)(va_arg( argv, int )); - __pformat_wputchars( (wchar_t *)argval.__pformat_ptr_t, 1, &stream ); + wchar_t argval = (wchar_t)(va_arg( argv, int )); + __pformat_wputchars( &argval, 1, &stream ); } else |