diff --git a/src/controller.c b/src/controller.c index 2224990..74b02d1 100644 --- a/src/controller.c +++ b/src/controller.c @@ -220,7 +220,7 @@ akerr_ErrorContext AKERR_NOIGNORE *SDL3G_controller_default(int controlmapid, ch ATTEMPT { // set up the control map 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->kbid = kbid; controlmap->jsid = jsid;