Skip to content

Commit eddf16e

Browse files
committedApr 18, 2017
Fix always using the xbox layout (reported by coverity).
1 parent 5433e9b commit eddf16e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎src/client/joystick_controller.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void JoystickController::onJoystickConnect(const std::vector<irr::SJoystickInfo>
186186
}
187187

188188
void JoystickController::setLayoutFromControllerName(std::string name) {
189-
if (lowercase(name).find("xbox") >= 0) {
189+
if (lowercase(name).find("xbox") != std::string::npos) {
190190
m_layout = create_xbox_layout();
191191
} else {
192192
m_layout = create_default_layout();

0 commit comments

Comments
 (0)