diff --git a/iop/usb/usbd/src/device.c b/iop/usb/usbd/src/device.c index d728e5f75a9..c5a14e1c098 100644 --- a/iop/usb/usbd/src/device.c +++ b/iop/usb/usbd/src/device.c @@ -55,7 +55,7 @@ int doGetDeviceLocation(UsbdDevice_t *dev, u8 *path) return USB_RC_BADHUBDEPTH; for ( cpCount = 0; cpCount < 7; cpCount += 1 ) { - path[cpCount] = (cpCount < count) ? tmpPath[count - cpCount - 1] : 0; + path[cpCount] = (cpCount < count) ? tmpPath[count - (cpCount + 1)] : 0; } return USB_RC_OK; }