dinput: Allocate correct amount of memory in IDirectInput8AImpl_EnumDevicesBySemantics.

Andrew Eikum aeikum at codeweavers.com
Mon Feb 13 08:45:04 CST 2017


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>

On Fri, Feb 10, 2017 at 04:56:14PM +0100, Sebastian Lackner wrote:
> Fixes 04bddb6c93dc3554fceff9612c56b62a43443b48.
> 
> Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
> ---
>  dlls/dinput/dinput_main.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
> index 65ce52c5c95..ab6a2e87874 100644
> --- a/dlls/dinput/dinput_main.c
> +++ b/dlls/dinput/dinput_main.c
> @@ -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;
>              }
>          }
> -- 
> 2.11.0
> 
> 



More information about the wine-patches mailing list