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
83455824
Commit
83455824
authored
Feb 06, 2024
by
Daniel Lehman
Committed by
Alexandre Julliard
Feb 13, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Handle exponent in VarBstrFromR[48] in non-English locales.
parent
5ffed883
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
vartype.c
dlls/oleaut32/tests/vartype.c
+4
-4
vartype.c
dlls/oleaut32/vartype.c
+10
-3
No files found.
dlls/oleaut32/tests/vartype.c
View file @
83455824
...
...
@@ -4570,11 +4570,11 @@ static void test_VarBstrFromR4(void)
{
1.0e14
,
L"1E+14"
},
{
999999999999999
.
0
,
L"1E+15"
},
{
1000000000000000
.
0
,
L"1E+15"
},
{
1200000000000000
.
0
,
L"1,2E+15"
,
TRUE
},
{
1200000000000000
.
0
,
L"1,2E+15"
},
{
1.0e15
,
L"1E+15"
},
{
1.000e16
,
L"1E+16"
},
{
1.234e16
,
L"1,234E+16"
,
TRUE
},
{
1.234e16
,
L"1,234E+16"
},
{
M_PI
,
L"3,141593"
},
{
0
.
0
,
NULL
}
...
...
@@ -4710,11 +4710,11 @@ static void test_VarBstrFromR8(void)
{
1.0e14
,
L"100000000000000"
},
{
999999999999999
.
0
,
L"999999999999999"
},
{
1000000000000000
.
0
,
L"1E+15"
},
{
1200000000000000
.
0
,
L"1,2E+15"
,
TRUE
},
{
1200000000000000
.
0
,
L"1,2E+15"
},
{
1.0e15
,
L"1E+15"
},
{
1.000e16
,
L"1E+16"
},
{
1.234e16
,
L"1,234E+16"
,
TRUE
},
{
1.234e16
,
L"1,234E+16"
},
{
0
.
0
,
NULL
}
};
...
...
dlls/oleaut32/vartype.c
View file @
83455824
...
...
@@ -6497,7 +6497,7 @@ static BSTR VARIANT_BstrReplaceDecimal(const WCHAR * buff, LCID lcid, ULONG dwFl
}
else
{
WCHAR
*
p
;
WCHAR
*
p
,
*
e
;
WCHAR
numbuff
[
256
];
WCHAR
empty
[]
=
L""
;
NUMBERFMTW
minFormat
;
...
...
@@ -6512,9 +6512,11 @@ static BSTR VARIANT_BstrReplaceDecimal(const WCHAR * buff, LCID lcid, ULONG dwFl
(
WCHAR
*
)
&
minFormat
.
LeadingZero
,
sizeof
(
DWORD
)
/
sizeof
(
WCHAR
)
);
/* count number of decimal digits in string */
p
=
wcschr
(
buff
,
'.'
);
if
(
p
)
minFormat
.
NumDigits
=
lstrlenW
(
p
+
1
);
p
=
wcschr
(
buff
,
'.'
);
e
=
wcschr
(
p
?
++
p
:
buff
,
'E'
);
if
(
p
)
minFormat
.
NumDigits
=
e
?
e
-
p
:
lstrlenW
(
p
);
if
(
e
)
*
e
=
'\0'
;
numbuff
[
0
]
=
'\0'
;
if
(
!
GetNumberFormatW
(
lcid
,
0
,
buff
,
&
minFormat
,
numbuff
,
ARRAY_SIZE
(
numbuff
)))
{
...
...
@@ -6523,6 +6525,11 @@ static BSTR VARIANT_BstrReplaceDecimal(const WCHAR * buff, LCID lcid, ULONG dwFl
}
else
{
if
(
e
)
{
*
e
=
'E'
;
wcscat
(
numbuff
,
e
);
}
TRACE
(
"created minimal NLS string %s
\n
"
,
debugstr_w
(
numbuff
));
bstrOut
=
SysAllocString
(
numbuff
);
}
...
...
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