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 257557ea8810b5f0
parent 2574 c1f07fdd1e2d
child 2576 034440120c38
Fixed some stray memcpy and free.
src/haptic/win32/SDL_syshaptic.c
     1.1 --- a/src/haptic/win32/SDL_syshaptic.c	Thu Jul 31 16:38:13 2008 +0000
     1.2 +++ b/src/haptic/win32/SDL_syshaptic.c	Thu Jul 31 17:11:36 2008 +0000
     1.3 @@ -166,7 +166,7 @@
     1.4  static BOOL CALLBACK
     1.5  EnumHapticsCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext)
     1.6  {
     1.7 -   memcpy(&SDL_hapticlist[SDL_numhaptics].instance, pdidInstance,
     1.8 +   SDL_memcpy(&SDL_hapticlist[SDL_numhaptics].instance, pdidInstance,
     1.9           sizeof(DIDEVICEINSTANCE));
    1.10     SDL_numhaptics++;
    1.11  
    1.12 @@ -376,7 +376,7 @@
    1.13     IDirectInputDevice2_Release(haptic->hwdata->device);   
    1.14  creat_err:
    1.15     if (haptic->hwdata != NULL) {
    1.16 -      free(haptic->hwdata);
    1.17 +      SDL_free(haptic->hwdata);
    1.18        haptic->hwdata = NULL;                                              
    1.19     }
    1.20     return -1;