fix: Token::IsMatch

This commit is contained in:
msojocs 2023-06-21 19:08:13 +08:00
parent 2d84ba10f0
commit b52db55a22

View File

@ -208,18 +208,22 @@ namespace WXML
bool Token::IsMatch(char const* str) bool Token::IsMatch(char const* str)
{ {
bool result = false;
if (this->offset_0.size() > 0) if (this->offset_0.size() > 0)
{ {
auto v4 = this->offset_20; auto v4 = this->offset_20;
for (int i = 0; ; i++) for (int i = 0; ; i++)
{ {
// if (v4 <= i) if (v4 <= i)
// return return str[v4] == 0;
if (this->offset_0[this->offset_16 + i] != str[i])
{
break;
}
} }
return false;
} }
return result; return false;
} }
} }
} }