mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed error when a self-referencing closing bracket was omitted from the IfCondition
This commit is contained in:
parent
521861a87d
commit
cf86d365ad
@ -251,10 +251,19 @@ bool IfActions::ReplaceSelf(std::wstring& condition, const WCHAR* section,
|
|||||||
while ((pos = condition.find(measureName, pos)) != std::wstring::npos)
|
while ((pos = condition.find(measureName, pos)) != std::wstring::npos)
|
||||||
{
|
{
|
||||||
condition.replace(pos, 1, eBracket.substr(0, 1));
|
condition.replace(pos, 1, eBracket.substr(0, 1));
|
||||||
pos = condition.find(sBracket[1], pos);
|
pos = condition.find(sBracket.substr(1, 1), pos);
|
||||||
condition.replace(pos, 1, eBracket.substr(1, 1));
|
|
||||||
++pos;
|
if (pos != std::wstring::npos)
|
||||||
replaced = true;
|
{
|
||||||
|
condition.replace(pos, 1, eBracket.substr(1, 1));
|
||||||
|
++pos;
|
||||||
|
replaced = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
replaced = false; // No closing bracket found
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return replaced;
|
return replaced;
|
||||||
|
Loading…
Reference in New Issue
Block a user