dinput: Allocate correct amount of memory in IDirectInput8AImpl_EnumDevicesBySemantics.

Fixes 04bddb6c93.

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>
oldstable
Sebastian Lackner 2017-02-10 16:56:14 +01:00 committed by Alexandre Julliard
parent 0cbcb71be9
commit f9b4be5556
1 changed files with 2 additions and 2 deletions

View File

@ -965,9 +965,9 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics(
if (enumSuccess == S_OK)
{
if (device_count++)
didevis = HeapReAlloc(GetProcessHeap(), 0, didevis, sizeof(DIDEVICEINSTANCEW)*device_count);
didevis = HeapReAlloc(GetProcessHeap(), 0, didevis, sizeof(DIDEVICEINSTANCEA)*device_count);
else
didevis = HeapAlloc(GetProcessHeap(), 0, sizeof(DIDEVICEINSTANCEW)*device_count);
didevis = HeapAlloc(GetProcessHeap(), 0, sizeof(DIDEVICEINSTANCEA)*device_count);
didevis[device_count-1] = didevi;
}
}