Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed some stray memcpy and free.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Jul 31, 2008
1 parent 149cc3d commit c49a3de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/haptic/win32/SDL_syshaptic.c
Expand Up @@ -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++;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c49a3de

Please sign in to comment.