Skip to content

Commit 17465e3

Browse files
authored
Merge pull request #752 from DKWDRV/usb_deviceLocationFix
usbd doGetDeviceLocation index fix
2 parents 5bbcdb1 + 0a498c9 commit 17465e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iop/usb/usbd/src/device.c

+1-1
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)