mirror of
https://github.com/msojocs/wx-compiler.git
synced 2025-07-19 00:00:04 +08:00
fix: Token::IsMatch
This commit is contained in:
parent
2d84ba10f0
commit
b52db55a22
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user