Commit 50f889fd authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput: Fix invalid use of post-incremented device_count value.

parent 01ddc2f8
......@@ -833,7 +833,8 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics(
if (enumSuccess == S_OK &&
should_enumerate_device(ptszUserName, dwFlags, &This->device_players, &didevi.guidInstance))
{
didevis = realloc( didevis, sizeof(DIDEVICEINSTANCEW) * device_count++ );
device_count++;
didevis = realloc( didevis, sizeof(DIDEVICEINSTANCEW) * 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