Skip to content

Commit

Permalink
hosted/bmp_libusb: Fixed a small mistake in the BMP product/version s…
Browse files Browse the repository at this point in the history
…tring handling
  • Loading branch information
dragonmux authored and esden committed Jul 31, 2023
1 parent d663d7d commit 394c3e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/platforms/hosted/bmp_libusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ void bmp_read_product_version(libusb_device_descriptor_s *device_descriptor, lib
(void)device;
(void)serial;
(void)manufacturer;
char *start_of_version;
*product = get_device_descriptor_string(handle, device_descriptor->iProduct);
start_of_version = strrchr(*product, ' ');

char *start_of_version = strrchr(*product, ' ');
if (start_of_version == NULL) {
version = NULL;
*version = NULL;
} else {
while (start_of_version[0] == ' ' && start_of_version != *product)
--start_of_version;
Expand Down

0 comments on commit 394c3e2

Please sign in to comment.