소스 검색

Handle invalid index in love.joystick, but then 1-indexed (bug #172)

--HG--
branch : minor
Bart van Strien 14 년 전
부모
커밋
df50a6e4c5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/modules/joystick/sdl/Joystick.cpp

+ 1 - 1
src/modules/joystick/sdl/Joystick.cpp

@@ -68,7 +68,7 @@ namespace sdl
 
 	bool Joystick::checkIndex(int index)
 	{
-		return index >= 0 && index < getNumJoysticks();
+		return index > 0 && index <= getNumJoysticks();
 	}
 
 	int Joystick::getNumJoysticks()