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

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2011-01-17 11:10:46 +01:00
parent 677df8d4f0
commit df50a6e4c5
+1 -1
View File
@@ -68,7 +68,7 @@ namespace sdl
bool Joystick::checkIndex(int index)
{
return index >= 0 && index < getNumJoysticks();
return index > 0 && index <= getNumJoysticks();
}
int Joystick::getNumJoysticks()