mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 17:06:25 +00:00
Fixed bug 4843 - Passing NULL to memset in SDL_PrivateLoadButtonMapping
(Thanks!)
This commit is contained in:
@@ -691,7 +691,9 @@ static void SDL_PrivateLoadButtonMapping(SDL_GameController *gamecontroller, con
|
||||
|
||||
gamecontroller->name = pchName;
|
||||
gamecontroller->num_bindings = 0;
|
||||
SDL_memset(gamecontroller->last_match_axis, 0, gamecontroller->joystick->naxes * sizeof(*gamecontroller->last_match_axis));
|
||||
if (gamecontroller->joystick->naxes) {
|
||||
SDL_memset(gamecontroller->last_match_axis, 0, gamecontroller->joystick->naxes * sizeof(*gamecontroller->last_match_axis));
|
||||
}
|
||||
|
||||
SDL_PrivateGameControllerParseControllerConfigString(gamecontroller, pchMapping);
|
||||
|
||||
|
Reference in New Issue
Block a user