Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
606e0c19
Commit
606e0c19
authored
Mar 08, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Mar 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Fix GetCurrencyFormatA when input length is 0.
Fixes a regression introduced by
42afb693
. Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
c55f8f35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
locale.c
dlls/kernel32/locale.c
+2
-4
No files found.
dlls/kernel32/locale.c
View file @
606e0c19
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment