Skip to content
Permalink
Browse files

Fix signed/unsigned conversion warning

There was no bug here (as I checked for negativeness),
however it's good to get rid of warnings.
  • Loading branch information
rubenwardy committed Apr 7, 2017
1 parent c28a843 commit 271d7c31e69db0bb6c5cf2cfb6e97ba129045d3e
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/client/joystick_controller.cpp
@@ -170,12 +170,12 @@ void JoystickController::onJoystickConnect(const std::vector<irr::SJoystickInfo>
s32 id = g_settings->getS32("joystick_id");
std::string layout = g_settings->get("joystick_type");

if (id < 0 || id >= joystick_infos.size()) {
if (id < 0 || (u16)id >= joystick_infos.size()) {
// TODO: auto detection
id = 0;
}

if (id >= 0 && id < joystick_infos.size()) {
if (id >= 0 && (u16)id < joystick_infos.size()) {
if (layout.empty() || layout == "auto")
setLayoutFromControllerName(joystick_infos[id].Name.c_str());
else

0 comments on commit 271d7c3

Please sign in to comment.
You can’t perform that action at this time.