config: verify string length in wrv2 before calling back

ref #5431
This commit is contained in:
Vaxry 2024-04-08 15:27:08 +01:00
parent 43b96f03b5
commit 785d9d9521

View File

@ -2084,7 +2084,7 @@ std::optional<std::string> CConfigManager::handleWindowRuleV2(const std::string&
result = removeBeginEndSpacesTabs(result);
if (result.back() == ',')
if (!result.empty() && result.back() == ',')
result.pop_back();
return result;