Pārlūkot izejas kodu

Fixed uninitialized variable

Sam Lantinga 2 gadi atpakaļ
vecāks
revīzija
35c13196f0
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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();