Skip to content

Commit

Permalink
Fixed bug 2430 - Missing initialization of the variable 'centroid' in…
Browse files Browse the repository at this point in the history
…side SDL_GestureAddTouch

klose

File: SDL_gesture.c
Method: SDL_GestureAddTouch

When a new SDL_GestureTouch element is added to the global SDL_gestureTouch array the variable 'centroid' of the new element is not initialized.

The problem is that this variable is read isndie SDL_GestureProcessEvent when a SDL_FINGERDOWN event occurs.
  • Loading branch information
slouken committed Mar 7, 2014
1 parent 9e67444 commit e9eb7ec
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/events/SDL_gesture.c
Expand Up @@ -418,13 +418,8 @@ int SDL_GestureAddTouch(SDL_TouchID touchId)

SDL_gestureTouch = gestureTouch;

SDL_gestureTouch[SDL_numGestureTouches].numDownFingers = 0;
SDL_zero(SDL_gestureTouch[SDL_numGestureTouches]);
SDL_gestureTouch[SDL_numGestureTouches].id = touchId;

SDL_gestureTouch[SDL_numGestureTouches].numDollarTemplates = 0;

SDL_gestureTouch[SDL_numGestureTouches].recording = SDL_FALSE;

SDL_numGestureTouches++;
return 0;
}
Expand Down

0 comments on commit e9eb7ec

Please sign in to comment.