From c49a3dea44a4d4fd0bdd6f3016025deb301a082a Mon Sep 17 00:00:00 2001 From: Edgar Simo Date: Thu, 31 Jul 2008 17:11:36 +0000 Subject: [PATCH] Fixed some stray memcpy and free. --- src/haptic/win32/SDL_syshaptic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/haptic/win32/SDL_syshaptic.c b/src/haptic/win32/SDL_syshaptic.c index 391824368..41cd50735 100644 --- a/src/haptic/win32/SDL_syshaptic.c +++ b/src/haptic/win32/SDL_syshaptic.c @@ -166,7 +166,7 @@ SDL_SYS_HapticInit(void) static BOOL CALLBACK EnumHapticsCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext) { - memcpy(&SDL_hapticlist[SDL_numhaptics].instance, pdidInstance, + SDL_memcpy(&SDL_hapticlist[SDL_numhaptics].instance, pdidInstance, sizeof(DIDEVICEINSTANCE)); SDL_numhaptics++; @@ -376,7 +376,7 @@ SDL_SYS_HapticOpenFromInstance(SDL_Haptic * haptic, DIDEVICEINSTANCE instance) IDirectInputDevice2_Release(haptic->hwdata->device); creat_err: if (haptic->hwdata != NULL) { - free(haptic->hwdata); + SDL_free(haptic->hwdata); haptic->hwdata = NULL; } return -1;