From 09ad9b17fb9114bfbe80a3d663f367c6a0dfc496 Mon Sep 17 00:00:00 2001 From: Tom Parker Date: Thu, 29 Oct 2020 22:28:32 +0000 Subject: [PATCH] [#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. --- Controllers/RGBFusion2USBController/RGBFusion2USBController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controllers/RGBFusion2USBController/RGBFusion2USBController.cpp b/Controllers/RGBFusion2USBController/RGBFusion2USBController.cpp index ee7d4864c..524b8cd79 100644 --- a/Controllers/RGBFusion2USBController/RGBFusion2USBController.cpp +++ b/Controllers/RGBFusion2USBController/RGBFusion2USBController.cpp @@ -48,7 +48,7 @@ RGBFusion2USBController::RGBFusion2USBController(hid_device* handle, const char report = *reinterpret_cast(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;