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
0bb48fcb
Commit
0bb48fcb
authored
Feb 22, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Avoid invalid rglDirection access when effect cAxes is 0.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
71d0cdde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
joystick_hid.c
dlls/dinput/joystick_hid.c
+3
-2
No files found.
dlls/dinput/joystick_hid.c
View file @
0bb48fcb
...
...
@@ -2296,7 +2296,7 @@ static void convert_directions_to_spherical( const DIEFFECT *in, DIEFFECT *out )
tmp
=
atan2
(
in
->
rglDirection
[
i
],
tmp
);
out
->
rglDirection
[
i
-
1
]
=
tmp
*
18000
/
M_PI
;
}
out
->
rglDirection
[
in
->
cAxes
-
1
]
=
0
;
if
(
in
->
cAxes
)
out
->
rglDirection
[
in
->
cAxes
-
1
]
=
0
;
out
->
cAxes
=
in
->
cAxes
;
break
;
case
DIEFF_POLAR
:
...
...
@@ -2306,7 +2306,8 @@ static void convert_directions_to_spherical( const DIEFFECT *in, DIEFFECT *out )
out
->
cAxes
=
in
->
cAxes
;
break
;
case
DIEFF_SPHERICAL
:
for
(
i
=
0
;
i
<
in
->
cAxes
-
1
;
++
i
)
if
(
!
in
->
cAxes
)
i
=
0
;
else
for
(
i
=
0
;
i
<
in
->
cAxes
-
1
;
++
i
)
{
out
->
rglDirection
[
i
]
=
in
->
rglDirection
[
i
]
%
36000
;
if
(
out
->
rglDirection
[
i
]
<
0
)
out
->
rglDirection
[
i
]
+=
36000
;
...
...
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