mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-31 17:07:39 +00:00
Fix use after free in SDL_GetGamepads
This commit is contained in:
parent
5cf55c4f28
commit
ea6f0ae683
1 changed files with 0 additions and 1 deletions
|
@ -1928,7 +1928,6 @@ SDL_JoystickID *SDL_GetGamepads(int *count)
|
|||
SDL_memmove(&joysticks[i], &joysticks[i+1], (num_gamepads + 1) * sizeof(joysticks[i]));
|
||||
}
|
||||
}
|
||||
SDL_free(joysticks);
|
||||
}
|
||||
if (count) {
|
||||
*count = num_gamepads;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue