mirror of
https://github.com/encounter/SDL.git
synced 2025-05-20 14:21:25 +00:00
os2joystick: fix uninitialized use of local var 'maxdevs'
This commit is contained in:
parent
17da60068d
commit
b9d98331c5
@ -184,6 +184,7 @@ static int OS2_JoystickInit(void)
|
|||||||
joyPortClose(&hJoyPort);
|
joyPortClose(&hJoyPort);
|
||||||
return SDL_SetError("Could not read joystick port.");
|
return SDL_SetError("Could not read joystick port.");
|
||||||
}
|
}
|
||||||
|
maxdevs = 0;
|
||||||
if (stGameParms.useA != 0) maxdevs++;
|
if (stGameParms.useA != 0) maxdevs++;
|
||||||
if (stGameParms.useB != 0) maxdevs++;
|
if (stGameParms.useB != 0) maxdevs++;
|
||||||
if (maxdevs > MAX_JOYSTICKS) maxdevs = MAX_JOYSTICKS;
|
if (maxdevs > MAX_JOYSTICKS) maxdevs = MAX_JOYSTICKS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user