Sebastian Lackner : dinput: Allocate correct amount of memory in IDirectInput8AImpl_EnumDevicesBySemantics.

Alexandre Julliard julliard at winehq.org
Mon Feb 13 15:24:40 CST 2017


Module: wine
Branch: master
Commit: f9b4be55561b52cbe7a89a9f6ce32c4db49d1ce5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f9b4be55561b52cbe7a89a9f6ce32c4db49d1ce5

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Fri Feb 10 16:56:14 2017 +0100

dinput: Allocate correct amount of memory in IDirectInput8AImpl_EnumDevicesBySemantics.

Fixes 04bddb6c93dc3554fceff9612c56b62a43443b48.

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 65ce52c..ab6a2e8 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;
             }
         }




More information about the wine-cvs mailing list