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
a610cfb6
Commit
a610cfb6
authored
Dec 28, 2008
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Dec 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Fix usage of HeapReAlloc.
parent
43b7f268
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+12
-5
No files found.
dlls/dinput/joystick_linuxinput.c
View file @
a610cfb6
...
...
@@ -228,6 +228,7 @@ static void find_joydevs(void)
int
fd
;
int
no_ff_check
=
0
;
int
j
;
struct
JoyDev
*
new_joydevs
;
snprintf
(
buf
,
sizeof
(
buf
),
EVDEVPREFIX
"%d"
,
i
);
...
...
@@ -319,12 +320,18 @@ static void find_joydevs(void)
}
}
if
(
have_joydevs
==
0
)
{
joydevs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
JoyDev
));
}
else
{
HeapReAlloc
(
GetProcessHeap
(),
0
,
joydevs
,
(
1
+
have_joydevs
)
*
sizeof
(
struct
JoyDev
));
if
(
!
have_joydevs
)
new_joydevs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
JoyDev
));
else
new_joydevs
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
joydevs
,
(
1
+
have_joydevs
)
*
sizeof
(
struct
JoyDev
));
if
(
!
new_joydevs
)
{
close
(
fd
);
continue
;
}
memcpy
(
joydevs
+
have_joydevs
,
&
joydev
,
sizeof
(
struct
JoyDev
));
joydevs
=
new_joydevs
;
memcpy
(
joydevs
+
have_joydevs
,
&
joydev
,
sizeof
(
joydev
));
have_joydevs
++
;
}
...
...
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