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
0d6c905a
Commit
0d6c905a
authored
Nov 28, 2023
by
Robert Wilhelm
Committed by
Alexandre Julliard
Nov 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix VarR8Round for negative numbers.
Floats with fractional part 0.5000 should be rounded to next even number. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55185
parent
56e19e2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
vartype.c
dlls/oleaut32/tests/vartype.c
+7
-0
vartype.c
dlls/oleaut32/vartype.c
+1
-1
No files found.
dlls/oleaut32/tests/vartype.c
View file @
0d6c905a
...
...
@@ -2716,6 +2716,13 @@ static void test_VarR8Round(void)
MATHRND
(
1
.
4999
,
0
);
EXPECT
(
1
);
MATHRND
(
1
.
5000
,
0
);
EXPECT
(
2
);
MATHRND
(
1
.
5001
,
0
);
EXPECT
(
2
);
MATHRND
(
-
0
.
4999
,
0
);
EXPECT
(
0
);
MATHRND
(
-
0
.
5000
,
0
);
EXPECT
(
0
);
MATHRND
(
-
0
.
5001
,
0
);
EXPECT
(
-
1
);
MATHRND
(
-
1
.
4999
,
0
);
EXPECT
(
-
1
);
MATHRND
(
-
1
.
5000
,
0
);
EXPECT
(
-
2
);
MATHRND
(
-
1
.
5001
,
0
);
EXPECT
(
-
2
);
}
/*
...
...
dlls/oleaut32/vartype.c
View file @
0d6c905a
...
...
@@ -3379,7 +3379,7 @@ HRESULT WINAPI VarR8Round(double dblIn, int nDig, double *pDblOut)
else
if
(
fract
>=
0
.
0
)
dblIn
=
whole
;
else
if
(
fract
==
-
0
.
5
)
dblIn
=
whole
-
fmod
(
whole
,
2
.
0
);
dblIn
=
whole
+
fmod
(
whole
,
2
.
0
);
else
if
(
fract
>
-
0
.
5
)
dblIn
=
whole
;
else
...
...
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