dinput: Allocate correct amount of memory in IDirectInput8AImpl_EnumDevicesBySemantics.
Fixes 04bddb6c93dc3554fceff9612c56b62a43443b48. Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0cbcb71be9
commit
f9b4be5556
@ -965,9 +965,9 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics(
|
|||||||
if (enumSuccess == S_OK)
|
if (enumSuccess == S_OK)
|
||||||
{
|
{
|
||||||
if (device_count++)
|
if (device_count++)
|
||||||
didevis = HeapReAlloc(GetProcessHeap(), 0, didevis, sizeof(DIDEVICEINSTANCEW)*device_count);
|
didevis = HeapReAlloc(GetProcessHeap(), 0, didevis, sizeof(DIDEVICEINSTANCEA)*device_count);
|
||||||
else
|
else
|
||||||
didevis = HeapAlloc(GetProcessHeap(), 0, sizeof(DIDEVICEINSTANCEW)*device_count);
|
didevis = HeapAlloc(GetProcessHeap(), 0, sizeof(DIDEVICEINSTANCEA)*device_count);
|
||||||
didevis[device_count-1] = didevi;
|
didevis[device_count-1] = didevi;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user