Commits

Bart van Strien  committed 6d84b1e

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

  • Participants
  • Parent commits 4aaec7a
  • Branches minor

Comments (0)

Files changed (1)

File src/modules/joystick/sdl/Joystick.cpp

 
 	bool Joystick::checkIndex(int index)
 	{
-		return index >= 0 && index < getNumJoysticks();
+		return index > 0 && index <= getNumJoysticks();
 	}
 
 	int Joystick::getNumJoysticks()