File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -437,20 +437,23 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
437
437
cur_dev -> path = NULL ;
438
438
439
439
/* Serial Number */
440
+ wstr [0 ]= 0x0000 ;
440
441
res = HidD_GetSerialNumberString (write_handle , wstr , sizeof (wstr ));
441
442
wstr [WSTR_LEN - 1 ] = 0x0000 ;
442
443
if (res ) {
443
444
cur_dev -> serial_number = _wcsdup (wstr );
444
445
}
445
446
446
447
/* Manufacturer String */
448
+ wstr [0 ]= 0x0000 ;
447
449
res = HidD_GetManufacturerString (write_handle , wstr , sizeof (wstr ));
448
450
wstr [WSTR_LEN - 1 ] = 0x0000 ;
449
451
if (res ) {
450
452
cur_dev -> manufacturer_string = _wcsdup (wstr );
451
453
}
452
454
453
455
/* Product String */
456
+ wstr [0 ]= 0x0000 ;
454
457
res = HidD_GetProductString (write_handle , wstr , sizeof (wstr ));
455
458
wstr [WSTR_LEN - 1 ] = 0x0000 ;
456
459
if (res ) {
You can’t perform that action at this time.
0 commit comments