Skip to content

Commit 0a498c9

Browse files
authored
doGetDeviceLocation index fix
1 parent 5bbcdb1 commit 0a498c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iop/usb/usbd/src/device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int doGetDeviceLocation(UsbdDevice_t *dev, u8 *path)
5555
return USB_RC_BADHUBDEPTH;
5656
for ( cpCount = 0; cpCount < 7; cpCount += 1 )
5757
{
58-
path[cpCount] = (cpCount < count) ? tmpPath[count - cpCount - 1] : 0;
58+
path[cpCount] = (cpCount < count) ? tmpPath[count - (cpCount + 1)] : 0;
5959
}
6060
return USB_RC_OK;
6161
}

0 commit comments

Comments
 (0)