Apply Fix on XCH.CHE Conditions Parser String Maker ...

This commit is contained in:
2024-09-08 15:33:24 +03:30
parent 9f98c82bb8
commit 752f5b6cdc
+27
View File
@@ -980,6 +980,33 @@ struct XCHCHEStartegyConditionsParser
"||" + "\n" + "||" + "\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; return result;
} }