!10158 change int to size_t

Merge pull request !10158 from 贺存茂/codecheck
This commit is contained in:
openharmony_ci 2024-11-08 02:16:30 +00:00 committed by Gitee
commit 26808674ff
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2432,7 +2432,7 @@ EcmaString *BuiltinsRegExp::EscapeRegExpPattern(JSThread *thread, const JSHandle
srcStdStr = "(?:)";
}
bool escapeChar = false;
for (int i = 0; i < srcStdStr.size(); i++) {
for (size_t i = 0; i < srcStdStr.size(); i++) {
if (srcStdStr[i] == '\\') {
escapeChar=!escapeChar;
} else if (!escapeChar && srcStdStr[i]=='/') {