Fixed some stray memcpy and free. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Thu, 31 Jul 2008 17:11:36 +0000
branchgsoc2008_force_feedback
changeset 2575 57ea8810b5f0
parent 2574 c1f07fdd1e2d
child 2576 034440120c38
Fixed some stray memcpy and free.
src/haptic/win32/SDL_syshaptic.c
--- a/src/haptic/win32/SDL_syshaptic.c	Thu Jul 31 16:38:13 2008 +0000
+++ b/src/haptic/win32/SDL_syshaptic.c	Thu Jul 31 17:11:36 2008 +0000
@@ -166,7 +166,7 @@
 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 @@
    IDirectInputDevice2_Release(haptic->hwdata->device);   
 creat_err:
    if (haptic->hwdata != NULL) {
-      free(haptic->hwdata);
+      SDL_free(haptic->hwdata);
       haptic->hwdata = NULL;                                              
    }
    return -1;