mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-04 20:54:16 -04:00
[#582,#448] Fix profile loading RGBController metadata mismatch issue with the RGBFusion2USBController.
The controller description mismatched what was being saved in the profile, with trailing '\0's filling the string to pad out the initialized 32 character string. Strangely enough the code to remove these '\0's was there, with just a minor typo referencing 'name' instead of 'description' to obtain the string's end index. Tested on an X570 Aorus Ultra board revision 1.2. Fixes issues #582 and #448.
This commit is contained in:
@@ -48,7 +48,7 @@ RGBFusion2USBController::RGBFusion2USBController(hid_device* handle, const char
|
||||
report = *reinterpret_cast<IT8297Report*>(buffer);
|
||||
|
||||
description = std::string(report.str_product, 32);
|
||||
//description.erase(std::find(description.begin(), description.end(), '\0'), name.end());
|
||||
description.erase(std::find(description.begin(), description.end(), '\0'), description.end());
|
||||
|
||||
snprintf(text, 11, "0x%08X", report.fw_ver);
|
||||
version = text;
|
||||
|
||||
Reference in New Issue
Block a user