From b8cdabbd20690d57930dce9dda949fca21a6233a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 1 Sep 2011 20:04:35 +0300 Subject: Eliminate asserts from most files. --- src/joystick.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/joystick.cpp') diff --git a/src/joystick.cpp b/src/joystick.cpp index 8f808a2d1..f45729351 100644 --- a/src/joystick.cpp +++ b/src/joystick.cpp @@ -24,8 +24,6 @@ #include "joystick.h" #include "logger.h" -#include - #include "debug.h" int Joystick::joystickCount = 0; @@ -48,7 +46,8 @@ Joystick::Joystick(int no): mCalibrating(false), mEnabled(false) { - assert(no < joystickCount); + if (no >= joystickCount) + no = joystickCount; mJoystick = SDL_JoystickOpen(no); -- cgit v1.2.3-60-g2f50