Fix bad pointer reference in SDL3G_controller_default
This commit is contained in:
@@ -220,7 +220,7 @@ akerr_ErrorContext AKERR_NOIGNORE *SDL3G_controller_default(int controlmapid, ch
|
|||||||
ATTEMPT {
|
ATTEMPT {
|
||||||
// set up the control map
|
// set up the control map
|
||||||
FAIL_NONZERO_RETURN(errctx, (controlmapid >= MAX_CONTROL_MAPS), AKERR_OUTOFBOUNDS, "ID %d exceeds maximum %d", controlmapid, MAX_CONTROL_MAPS);
|
FAIL_NONZERO_RETURN(errctx, (controlmapid >= MAX_CONTROL_MAPS), AKERR_OUTOFBOUNDS, "ID %d exceeds maximum %d", controlmapid, MAX_CONTROL_MAPS);
|
||||||
memset((void *)control, 0x00, sizeof(SDL3GControl));
|
memset((void *)&control, 0x00, sizeof(SDL3GControl));
|
||||||
controlmap = &GAME_ControlMaps[controlmapid];
|
controlmap = &GAME_ControlMaps[controlmapid];
|
||||||
controlmap->kbid = kbid;
|
controlmap->kbid = kbid;
|
||||||
controlmap->jsid = jsid;
|
controlmap->jsid = jsid;
|
||||||
|
|||||||
Reference in New Issue
Block a user