diff --git a/hardware/arduino/avr/cores/arduino/PluggableUSB.cpp b/hardware/arduino/avr/cores/arduino/PluggableUSB.cpp index 582379a84..7125775d8 100644 --- a/hardware/arduino/avr/cores/arduino/PluggableUSB.cpp +++ b/hardware/arduino/avr/cores/arduino/PluggableUSB.cpp @@ -31,7 +31,7 @@ int PluggableUSB_::getInterface(uint8_t* interfaceNum) PUSBListNode* node; for (node = rootNode; node; node = node->next) { int res = node->getInterface(interfaceNum); - if (res == -1) + if (res < 0) return -1; sent += res; }