From 09e3371a0db5ef4a7858c83f838434f176020fdb Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 27 Oct 2023 12:04:04 -0700 Subject: [PATCH] Config: Fixes string enum parser with multiple arguments Messed up when originally implementing this, substr's second argument is requested substring length, not the ending position. Noticed this while trying to parse multiple FEX_HOSTFEATURES options. --- FEXCore/include/FEXCore/Config/Config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FEXCore/include/FEXCore/Config/Config.h b/FEXCore/include/FEXCore/Config/Config.h index d9d4e69fb..65ebbb1af 100644 --- a/FEXCore/include/FEXCore/Config/Config.h +++ b/FEXCore/include/FEXCore/Config/Config.h @@ -118,7 +118,7 @@ namespace Handler { } Begin = End + 1; End = View.find_first_of(',', Begin); - Option = View.substr(Begin, End); + Option = View.substr(Begin, End - Begin); } return fextl::fmt::format("{}", EnumMask);