Commit cb5e86353b97a391d865ad12974b637242289f27

Sam Lantinga 2021-06-08T13:15:24

Fixed crash after reinitializing libusb HID support

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/hidapi/libusb/hid.c b/src/hidapi/libusb/hid.c
index 1175da9..dfc9ecb 100644
--- a/src/hidapi/libusb/hid.c
+++ b/src/hidapi/libusb/hid.c
@@ -480,6 +480,7 @@ static void usb_string_cache_destroy()
 
 	usb_string_cache = NULL;
 	usb_string_cache_size = 0;
+	usb_string_cache_insert_pos = 0;
 }
 
 static struct usb_string_cache_entry *usb_string_cache_insert()