From df50a6e4c5480c540de53d6ebfa754490dfac7c5 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Mon, 17 Jan 2011 11:10:46 +0100 Subject: [PATCH] Handle invalid index in love.joystick, but then 1-indexed (bug #172) --HG-- branch : minor --- src/modules/joystick/sdl/Joystick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/joystick/sdl/Joystick.cpp b/src/modules/joystick/sdl/Joystick.cpp index 5c896147a..80f0bb017 100644 --- a/src/modules/joystick/sdl/Joystick.cpp +++ b/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()