Fix use after free in SDL_GetGamepads
parent
5cf55c4f28
commit
ea6f0ae683
|
@ -1928,7 +1928,6 @@ SDL_JoystickID *SDL_GetGamepads(int *count)
|
||||||
SDL_memmove(&joysticks[i], &joysticks[i+1], (num_gamepads + 1) * sizeof(joysticks[i]));
|
SDL_memmove(&joysticks[i], &joysticks[i+1], (num_gamepads + 1) * sizeof(joysticks[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SDL_free(joysticks);
|
|
||||||
}
|
}
|
||||||
if (count) {
|
if (count) {
|
||||||
*count = num_gamepads;
|
*count = num_gamepads;
|
||||||
|
|
Loading…
Reference in New Issue