SDL-1.2: os2joystick: fix uninitialized use of local var 'maxdevs'

From e6867458bf8d0ad2bc3b109b15fe860ada1047c3 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 1 Jan 2022 20:50:10 +0300
Subject: [PATCH] os2joystick: fix uninitialized use of local var 'maxdevs'

---
 src/joystick/os2/SDL_sysjoystick.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/joystick/os2/SDL_sysjoystick.c b/src/joystick/os2/SDL_sysjoystick.c
index c10c673c..64f68c3f 100644
--- a/src/joystick/os2/SDL_sysjoystick.c
+++ b/src/joystick/os2/SDL_sysjoystick.c
@@ -189,6 +189,7 @@ int SDL_SYS_JoystickInit(void)
 		SDL_SetError("Could not read joystick port.");
 		return -1;
 	}
+	maxdevs = 0;
 	if (stGameParms.useA != 0) maxdevs++;
 	if (stGameParms.useB != 0) maxdevs++;
 	if (maxdevs > MAX_JOYSTICKS) maxdevs = MAX_JOYSTICKS;