浏览代码

Fixed uninitialized variable

Sam Lantinga 2 年之前
父节点
当前提交
35c13196f0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/joystick/SDL_joystick.c

+ 1 - 1
src/joystick/SDL_joystick.c

@@ -202,7 +202,7 @@ static SDL_bool SDL_GetDriverAndJoystickIndex(int device_index, SDL_JoystickDriv
 
 static int SDL_FindFreePlayerIndex()
 {
-    int player_index;
+    int player_index = -1;
 
     SDL_AssertJoysticksLocked();