diff --git a/src/events/SDL_gesture.c b/src/events/SDL_gesture.c index e8477acbb..4193b9d17 100644 --- a/src/events/SDL_gesture.c +++ b/src/events/SDL_gesture.c @@ -481,7 +481,7 @@ int SDL_GestureDelTouch(SDL_TouchID touchId) SDL_zero(SDL_gestureTouch[i]); SDL_numGestureTouches--; - SDL_gestureTouch[i] = SDL_gestureTouch[SDL_numGestureTouches]; + SDL_memcpy(&SDL_gestureTouch[i], &SDL_gestureTouch[SDL_numGestureTouches], sizeof(SDL_gestureTouch[i])); return 0; }