@@ -40,9 +40,8 @@ int Ui::OpenRGBHardwareIDsDialog::show()
40
40
char line[550 ];
41
41
snprintf (line, 550 , " %04X:%04X %04X:%04X" , bus->pci_vendor , bus->pci_device , bus->pci_subsystem_vendor , bus->pci_subsystem_device );
42
42
new QTreeWidgetItem (i2c_top, {line, bus->device_name });
43
- // We keep the strings for the clipboard feature
44
- strncat (line, " - " , 550 );
45
- strncat (line, bus->device_name , 550 );
43
+
44
+ snprintf (line, 550 , " %04X:%04X %04X:%04X - %s" , bus->pci_vendor , bus->pci_device , bus->pci_subsystem_vendor , bus->pci_subsystem_device , bus->device_name );
46
45
strings.push_back (line);
47
46
}
48
47
@@ -68,10 +67,9 @@ int Ui::OpenRGBHardwareIDsDialog::show()
68
67
snprintf (line, 550 , " [%04X:%04X U=%04X P=0x%04X I=%d]" , current_hid_device->vendor_id , current_hid_device->product_id , current_hid_device->usage , current_hid_device->usage_page , current_hid_device->interface_number );
69
68
new QTreeWidgetItem (hid_top, {line, prod_name, manu_name});
70
69
71
- strncat (line, manu_name, 550 );
72
- strncat (line, " - " , 550 );
73
- strncat (line, prod_name, 550 );
70
+ snprintf (line, 550 , " [%04X:%04X U=%04X P=0x%04X I=%d] %s - %s" , current_hid_device->vendor_id , current_hid_device->product_id , current_hid_device->usage , current_hid_device->usage_page , current_hid_device->interface_number , manu_name, prod_name);
74
71
strings.push_back (line);
72
+
75
73
current_hid_device = current_hid_device->next ;
76
74
}
77
75
@@ -114,7 +112,7 @@ int Ui::OpenRGBHardwareIDsDialog::show()
114
112
}
115
113
116
114
char line[512 ];
117
- sprintf (line, " %04X:%04X" , descriptor.idVendor , descriptor.idProduct );
115
+ snprintf (line, 512 , " %04X:%04X" , descriptor.idVendor , descriptor.idProduct );
118
116
new QTreeWidgetItem (libusb_top, {line});
119
117
strings.push_back (line);
120
118
}
0 commit comments