diff src/haptic/SDL_haptic.c @ 2524:1a55848ce198 gsoc2008_force_feedback

Better handling of opening haptics from joysticks. Fixed segfault when opening from joystick.
author Edgar Simo <bobbens@gmail.com>
date Thu, 17 Jul 2008 16:07:20 +0000
parents 366d84fdf8d1
children 2d88b82ce781
line wrap: on
line diff
--- a/src/haptic/SDL_haptic.c	Thu Jul 17 11:47:48 2008 +0000
+++ b/src/haptic/SDL_haptic.c	Thu Jul 17 16:07:20 2008 +0000
@@ -274,7 +274,7 @@
    }
 
    /* Initialize the haptic device */
-   SDL_memset(haptic, 0, (sizeof *haptic));
+   SDL_memset(haptic, 0, sizeof(SDL_Haptic));
    if (SDL_SYS_HapticOpenFromJoystick(haptic,joystick) < 0) {
       SDL_free(haptic);
       return NULL;