修复cm_ctl pause等命令由于数组下标越界导致core问题

This commit is contained in:
chen.zhu 2024-01-10 15:18:50 +08:00
parent b4eaf9e9a2
commit bbc042d3af

View File

@ -273,7 +273,7 @@ static string CheckActionOptions(CtlCommand ctlCommandAction, vector<int> option
for (int checkIndexO = 0; checkIndexO < optionInLength; ++checkIndexO) {
bool checkInArr = false;
int checkIndexI = 0;
while (checkInterOptions[checkIndexI]!= 0) {
while (checkIndexI < (int)checkInterOptions.size() && checkInterOptions[checkIndexI]!= 0) {
if (optionIn[checkIndexO] == checkInterOptions[checkIndexI]) {
checkInArr = true;
break;