mirror of https://github.com/encounter/SDL.git
Fixed bug 5465 - Invalid memcpy inside SDL_GestureDelTouch (Thanks dmikushin and Yuki Okumura)
This commit is contained in:
parent
b94718e0a7
commit
68815b6c06
|
@ -487,7 +487,9 @@ int SDL_GestureDelTouch(SDL_TouchID touchId)
|
|||
SDL_zero(SDL_gestureTouch[i]);
|
||||
|
||||
SDL_numGestureTouches--;
|
||||
SDL_memcpy(&SDL_gestureTouch[i], &SDL_gestureTouch[SDL_numGestureTouches], sizeof(SDL_gestureTouch[i]));
|
||||
if (i != SDL_numGestureTouches) {
|
||||
SDL_memcpy(&SDL_gestureTouch[i], &SDL_gestureTouch[SDL_numGestureTouches], sizeof(SDL_gestureTouch[i]));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue