mirror of https://github.com/encounter/SDL.git
Fixed bug 4843 - Passing NULL to memset in SDL_PrivateLoadButtonMapping
(Thanks!)
This commit is contained in:
parent
ed469fa586
commit
0f871c033c
|
@ -691,7 +691,9 @@ static void SDL_PrivateLoadButtonMapping(SDL_GameController *gamecontroller, con
|
||||||
|
|
||||||
gamecontroller->name = pchName;
|
gamecontroller->name = pchName;
|
||||||
gamecontroller->num_bindings = 0;
|
gamecontroller->num_bindings = 0;
|
||||||
|
if (gamecontroller->joystick->naxes) {
|
||||||
SDL_memset(gamecontroller->last_match_axis, 0, gamecontroller->joystick->naxes * sizeof(*gamecontroller->last_match_axis));
|
SDL_memset(gamecontroller->last_match_axis, 0, gamecontroller->joystick->naxes * sizeof(*gamecontroller->last_match_axis));
|
||||||
|
}
|
||||||
|
|
||||||
SDL_PrivateGameControllerParseControllerConfigString(gamecontroller, pchMapping);
|
SDL_PrivateGameControllerParseControllerConfigString(gamecontroller, pchMapping);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue