Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3153aa91
Commit
3153aa91
authored
Jul 19, 2005
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Jul 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that underflowing negative float is represented as a positive
0, just as native oleaut32.
parent
af2e7eb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
vartype.c
dlls/oleaut32/tests/vartype.c
+1
-1
vartype.c
dlls/oleaut32/vartype.c
+13
-0
No files found.
dlls/oleaut32/tests/vartype.c
View file @
3153aa91
...
...
@@ -4615,7 +4615,7 @@ static void test_VarBstrFromR4(void)
ok
(
hres
==
S_OK
,
"got hres 0x%08lx
\n
"
,
hres
);
if
(
bstr
)
{
todo_wine
ok
(
memcmp
(
bstr
,
szZero
,
sizeof
(
szZero
))
==
0
,
"negative zero (got %s)
\n
"
,
wtoascii
(
bstr
));
ok
(
memcmp
(
bstr
,
szZero
,
sizeof
(
szZero
))
==
0
,
"negative zero (got %s)
\n
"
,
wtoascii
(
bstr
));
}
}
...
...
dlls/oleaut32/vartype.c
View file @
3153aa91
...
...
@@ -5258,6 +5258,19 @@ static HRESULT VARIANT_BstrFromReal(DOUBLE dblIn, LCID lcid, ULONG dwFlags,
return
E_INVALIDARG
;
sprintfW
(
buff
,
lpszFormat
,
dblIn
);
/* Negative zeroes are disallowed (some applications depend on this).
If buff starts with a minus, and then nothing follows but zeroes
and/or a period, it is a negative zero and is replaced with a
canonical zero. This duplicates native oleaut32 behavior.
*/
if
(
buff
[
0
]
==
'-'
)
{
const
WCHAR
szAccept
[]
=
{
'0'
,
'.'
,
'\0'
};
if
(
strlenW
(
buff
+
1
)
==
strspnW
(
buff
+
1
,
szAccept
))
{
buff
[
0
]
=
'0'
;
buff
[
1
]
=
'\0'
;
}
}
TRACE
(
"created string %s
\n
"
,
debugstr_w
(
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