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
4a4effe3
Commit
4a4effe3
authored
Dec 20, 2006
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Dec 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: VarBstrFromCy - Remove use of sprintfW by converting a CY
into a DECIMAL instead of a double as an intermediate step.
parent
ed219354
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
vartype.c
dlls/oleaut32/vartype.c
+16
-3
No files found.
dlls/oleaut32/vartype.c
View file @
4a4effe3
...
...
@@ -6499,13 +6499,26 @@ HRESULT WINAPI VarBstrFromR8(double dblIn, LCID lcid, ULONG dwFlags, BSTR* pbstr
HRESULT
WINAPI
VarBstrFromCy
(
CY
cyIn
,
LCID
lcid
,
ULONG
dwFlags
,
BSTR
*
pbstrOut
)
{
WCHAR
buff
[
256
];
double
dbl
Val
;
VARIANT_DI
dec
Val
;
if
(
!
pbstrOut
)
return
E_INVALIDARG
;
VarR8FromCy
(
cyIn
,
&
dblVal
);
sprintfW
(
buff
,
szDoubleFormatW
,
dblVal
);
decVal
.
scale
=
4
;
decVal
.
sign
=
0
;
decVal
.
bitsnum
[
0
]
=
cyIn
.
s
.
Lo
;
decVal
.
bitsnum
[
1
]
=
cyIn
.
s
.
Hi
;
if
(
cyIn
.
s
.
Hi
&
0x80000000UL
)
{
DWORD
one
=
1
;
/* Negative number! */
decVal
.
sign
=
1
;
decVal
.
bitsnum
[
0
]
=
~
decVal
.
bitsnum
[
0
];
decVal
.
bitsnum
[
1
]
=
~
decVal
.
bitsnum
[
1
];
VARIANT_int_add
(
decVal
.
bitsnum
,
3
,
&
one
,
1
);
}
decVal
.
bitsnum
[
2
]
=
0
;
VARIANT_DI_tostringW
(
&
decVal
,
buff
,
sizeof
(
buff
));
if
(
dwFlags
&
LOCALE_USE_NLS
)
{
...
...
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