mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:55:43 +00:00
[CRT][USER32] fix wsprintf additional argument (%*s) (#1470)
Reduce wsprintf function failures ("%*s"). CORE-13955
This commit is contained in:
parent
2fd3a8f1b5
commit
6388b91a4d
1 changed files with 14 additions and 1 deletions
|
@ -3,7 +3,8 @@
|
||||||
* PROJECT: ReactOS crt library
|
* PROJECT: ReactOS crt library
|
||||||
* FILE: lib/sdk/crt/printf/streamout.c
|
* FILE: lib/sdk/crt/printf/streamout.c
|
||||||
* PURPOSE: Implementation of streamout
|
* PURPOSE: Implementation of streamout
|
||||||
* PROGRAMMER: Timo Kreuzer
|
* PROGRAMMERS: Timo Kreuzer
|
||||||
|
* Katayama Hirofumi MZ
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -372,6 +373,11 @@ streamout(FILE *stream, const TCHAR *format, va_list argptr)
|
||||||
/* Handle field width modifier */
|
/* Handle field width modifier */
|
||||||
if (chr == _T('*'))
|
if (chr == _T('*'))
|
||||||
{
|
{
|
||||||
|
#ifdef _USER32_WSPRINTF
|
||||||
|
if ((written = streamout_char(stream, chr)) == 0) return -1;
|
||||||
|
written_all += written;
|
||||||
|
continue;
|
||||||
|
#else
|
||||||
fieldwidth = va_arg(argptr, int);
|
fieldwidth = va_arg(argptr, int);
|
||||||
if (fieldwidth < 0)
|
if (fieldwidth < 0)
|
||||||
{
|
{
|
||||||
|
@ -379,6 +385,7 @@ streamout(FILE *stream, const TCHAR *format, va_list argptr)
|
||||||
fieldwidth = -fieldwidth;
|
fieldwidth = -fieldwidth;
|
||||||
}
|
}
|
||||||
chr = *format++;
|
chr = *format++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -397,8 +404,14 @@ streamout(FILE *stream, const TCHAR *format, va_list argptr)
|
||||||
|
|
||||||
if (chr == _T('*'))
|
if (chr == _T('*'))
|
||||||
{
|
{
|
||||||
|
#ifdef _USER32_WSPRINTF
|
||||||
|
if ((written = streamout_char(stream, chr)) == 0) return -1;
|
||||||
|
written_all += written;
|
||||||
|
continue;
|
||||||
|
#else
|
||||||
precision = va_arg(argptr, int);
|
precision = va_arg(argptr, int);
|
||||||
chr = *format++;
|
chr = *format++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue