mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-21 13:38:20 -05:00
Remove null terminating chars from profile names before using them in ProfileManager
This commit is contained in:
@@ -38,3 +38,14 @@ const char* StringUtils::wchar_to_char(const wchar_t* pwchar)
|
||||
|
||||
return filePathC;
|
||||
}
|
||||
|
||||
const std::string StringUtils::remove_null_terminating_chars(std::string input)
|
||||
{
|
||||
while (!input.empty() && input.back() == 0)
|
||||
{
|
||||
input.pop_back();
|
||||
}
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user