未验证 提交 303dd9a4 编写于 作者: O openharmony_ci 提交者: Gitee

!1644 解决trigger checker的bug挑单到1018

Merge pull request !1644 from linrj/cherry-pick-1671678525
...@@ -329,20 +329,21 @@ int CheckMatchSubCondition(const char *condition, const char *input, int length) ...@@ -329,20 +329,21 @@ int CheckMatchSubCondition(const char *condition, const char *input, int length)
PARAM_CHECK(condition != NULL, return 0, "Invalid condition"); PARAM_CHECK(condition != NULL, return 0, "Invalid condition");
PARAM_CHECK(input != NULL, return 0, "Invalid input"); PARAM_CHECK(input != NULL, return 0, "Invalid input");
const char *tmp = strstr(condition, input); const char *tmp = strstr(condition, input);
if (tmp == NULL) { while (tmp != NULL)
return 0; {
} PARAM_LOGV("CheckMatchSubCondition Condition: '%s' content: '%s' length %d", condition, input, length);
PARAM_LOGV("CheckMatchSubCondition Condition: '%s' content: '%s' length %d", condition, input, length); if (((int)strlen(tmp) <= length) || (tmp[length] != '=')) {
if (((int)strlen(tmp) <= length) || (tmp[length] != '=')) { return 0;
return 0; }
} // for condition: parameter = 1
// for condition: parameter = 1 if (tmp == condition) {
if (tmp == condition) { return 1;
return 1; }
} // for condition: parameter1 = 1 && parameter2 = 1
// for condition: parameter1 = 1 && parameter2 = 1 if (*(tmp - 1) == ' ') {
if (*(tmp - 1) == ' ') { return 1;
return 1; }
tmp = strstr(tmp + 1, input);
} }
return 0; return 0;
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册