mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:35:52 +00:00
kernel32: Fix GetCurrencyFormatA when input length is 0.
Fixes a regression introduced by 42afb693b1
.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
c55f8f3518
commit
606e0c191e
|
@ -481,8 +481,6 @@ int WINAPI GetCurrencyFormatA( LCID lcid, DWORD flags, const char *value,
|
|||
}
|
||||
MultiByteToWideChar( cp, 0, value, -1, input, ARRAY_SIZE(input) );
|
||||
|
||||
if (len > (int)ARRAY_SIZE(output)) len = ARRAY_SIZE(output);
|
||||
|
||||
if (format)
|
||||
{
|
||||
CURRENCYFMTW fmt;
|
||||
|
@ -509,9 +507,9 @@ int WINAPI GetCurrencyFormatA( LCID lcid, DWORD flags, const char *value,
|
|||
fmt.lpDecimalSep = fmt_decimal;
|
||||
fmt.lpThousandSep = fmt_thousand;
|
||||
fmt.lpCurrencySymbol = fmt_symbol;
|
||||
ret = GetCurrencyFormatW( lcid, flags, input, &fmt, output, len );
|
||||
ret = GetCurrencyFormatW( lcid, flags, input, &fmt, output, ARRAY_SIZE(output) );
|
||||
}
|
||||
else ret = GetCurrencyFormatW( lcid, flags, input, NULL, output, len );
|
||||
else ret = GetCurrencyFormatW( lcid, flags, input, NULL, output, ARRAY_SIZE(output) );
|
||||
|
||||
if (ret) ret = WideCharToMultiByte( cp, 0, output, -1, buffer, len, 0, 0 );
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue