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
3dc8b28d
Commit
3dc8b28d
authored
Nov 09, 2009
by
Viliam Lejcik
Committed by
Alexandre Julliard
Nov 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Fix GetCurrencyFormat grouping.
parent
937fd398
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
lcformat.c
dlls/kernel32/lcformat.c
+1
-1
locale.c
dlls/kernel32/tests/locale.c
+24
-0
No files found.
dlls/kernel32/lcformat.c
View file @
3dc8b28d
...
...
@@ -1521,7 +1521,7 @@ GetCurrencyFormatW_Error:
dwState
|=
NF_DIGITS_OUT
;
dwCurrentGroupCount
++
;
if
(
szSrc
>=
lpszValue
&&
dwCurrentGroupCount
==
dwGroupCount
)
if
(
szSrc
>=
lpszValue
&&
dwCurrentGroupCount
==
dwGroupCount
&&
*
szSrc
!=
'-'
)
{
LPWSTR
lpszGrp
=
lpFormat
->
lpThousandSep
+
strlenW
(
lpFormat
->
lpThousandSep
)
-
1
;
...
...
dlls/kernel32/tests/locale.c
View file @
3dc8b28d
...
...
@@ -743,6 +743,18 @@ static void test_GetCurrencyFormatA(void)
ok
(
ret
,
"Expected ret != 0, got %d, error %d
\n
"
,
ret
,
GetLastError
());
EXPECT_LENA
;
EXPECT_EQA
;
STRINGSA
(
"235"
,
"$235.0"
);
/* Grouping of a positive number */
format
.
Grouping
=
3
;
ret
=
GetCurrencyFormatA
(
lcid
,
0
,
input
,
&
format
,
buffer
,
COUNTOF
(
buffer
));
ok
(
ret
,
"Expected ret != 0, got %d, error %d
\n
"
,
ret
,
GetLastError
());
EXPECT_LENA
;
EXPECT_EQA
;
STRINGSA
(
"-235"
,
"$-235.0"
);
/* Grouping of a negative number */
format
.
NegativeOrder
=
2
;
ret
=
GetCurrencyFormatA
(
lcid
,
0
,
input
,
&
format
,
buffer
,
COUNTOF
(
buffer
));
ok
(
ret
,
"Expected ret != 0, got %d, error %d
\n
"
,
ret
,
GetLastError
());
EXPECT_LENA
;
EXPECT_EQA
;
format
.
LeadingZero
=
1
;
/* Always provide leading zero */
STRINGSA
(
".5"
,
"$0.5"
);
ret
=
GetCurrencyFormatA
(
lcid
,
0
,
input
,
&
format
,
buffer
,
COUNTOF
(
buffer
));
...
...
@@ -990,6 +1002,18 @@ static void test_GetNumberFormatA(void)
ok
(
ret
,
"Expected ret != 0, got %d, error %d
\n
"
,
ret
,
GetLastError
());
EXPECT_LENA
;
EXPECT_EQA
;
STRINGSA
(
"235"
,
"235.0"
);
/* Grouping of a positive number */
format
.
Grouping
=
3
;
ret
=
GetNumberFormatA
(
lcid
,
0
,
input
,
&
format
,
buffer
,
COUNTOF
(
buffer
));
ok
(
ret
,
"Expected ret != 0, got %d, error %d
\n
"
,
ret
,
GetLastError
());
EXPECT_LENA
;
EXPECT_EQA
;
STRINGSA
(
"-235"
,
"-235.0"
);
/* Grouping of a negative number */
format
.
NegativeOrder
=
NEG_LEFT
;
ret
=
GetNumberFormatA
(
lcid
,
0
,
input
,
&
format
,
buffer
,
COUNTOF
(
buffer
));
ok
(
ret
,
"Expected ret != 0, got %d, error %d
\n
"
,
ret
,
GetLastError
());
EXPECT_LENA
;
EXPECT_EQA
;
format
.
LeadingZero
=
1
;
/* Always provide leading zero */
STRINGSA
(
".5"
,
"0.5"
);
ret
=
GetNumberFormatA
(
lcid
,
0
,
input
,
&
format
,
buffer
,
COUNTOF
(
buffer
));
...
...
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