소스 검색

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();