Commit f9b4be55 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

dinput: Allocate correct amount of memory in IDirectInput8AImpl_EnumDevicesBySemantics.

parent 0cbcb71b
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment