Explorar el Código

putil: fix a compiler warning

rdb hace 7 años
padre
commit
aae2b1e5ad
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      panda/src/putil/gamepadButton.cxx

+ 1 - 1
panda/src/putil/gamepadButton.cxx

@@ -63,7 +63,7 @@ joystick(int button_number) {
   if (button_number >= 0) {
   if (button_number >= 0) {
     // "button1" does not exist, it is called "trigger" instead
     // "button1" does not exist, it is called "trigger" instead
     static pvector<ButtonHandle> buttons(1, _trigger);
     static pvector<ButtonHandle> buttons(1, _trigger);
-    while (button_number >= buttons.size()) {
+    while ((size_t)button_number >= buttons.size()) {
       char numstr[20];
       char numstr[20];
       sprintf(numstr, "joystick%d", (int)buttons.size() + 1);
       sprintf(numstr, "joystick%d", (int)buttons.size() + 1);
       ButtonHandle handle;
       ButtonHandle handle;