From eddf16eee9cb3627f4f62d37ea2942fc7546fae7 Mon Sep 17 00:00:00 2001 From: Ekdohibs Date: Tue, 18 Apr 2017 06:40:53 +0200 Subject: Fix always using the xbox layout (reported by coverity). --- src/client/joystick_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/joystick_controller.cpp') diff --git a/src/client/joystick_controller.cpp b/src/client/joystick_controller.cpp index e6a572adb..3e1442793 100644 --- a/src/client/joystick_controller.cpp +++ b/src/client/joystick_controller.cpp @@ -186,7 +186,7 @@ void JoystickController::onJoystickConnect(const std::vector } void JoystickController::setLayoutFromControllerName(std::string name) { - if (lowercase(name).find("xbox") >= 0) { + if (lowercase(name).find("xbox") != std::string::npos) { m_layout = create_xbox_layout(); } else { m_layout = create_default_layout(); -- cgit v1.2.3