Apply fix on Parsers Conditions for && Cleaning on last index ...

This commit is contained in:
2024-09-05 01:28:47 +03:30
parent 86d8bbeed7
commit b56cf496a7
2 changed files with 113 additions and 7 deletions
+27
View File
@@ -756,6 +756,33 @@ struct XCHStartegyConditionsParser
"||" + "\n" +
"//";
//
string query = "&&";
int andIndexes[];
int andIndexesCount = FindIndexes(
query,
result,
andIndexes //
);
if (IsValidSize(andIndexesCount)) {
//
int lastAndIndex = andIndexes[ArraySize(andIndexes) - 1];
//
string beforeStr = StringSubstr(
result,
0,
lastAndIndex //
);
string afterStr = StringSubstr(
result,
lastAndIndex + StringLen(query)
);
//
result = beforeStr + afterStr;
}
//
return result;
}