mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-01-19 12:07:13 +01:00
Fix incorrect size check in entity search algorithms.
This commit is contained in:
parent
b4bfced27b
commit
cb82a98bf6
@ -65,7 +65,7 @@ void EachBegins(Iterator first, Iterator last,
|
|||||||
// Retrieve the string
|
// Retrieve the string
|
||||||
const auto & s = retrieve(*first);
|
const auto & s = retrieve(*first);
|
||||||
// Compare the string
|
// Compare the string
|
||||||
if (s.size() > len && (s.compare(0, len, str) == 0) == neg)
|
if (s.size() >= len && (s.compare(0, len, str) == 0) == neg)
|
||||||
{
|
{
|
||||||
collect(*first);
|
collect(*first);
|
||||||
}
|
}
|
||||||
@ -90,7 +90,7 @@ void EachEnds(Iterator first, Iterator last,
|
|||||||
// Retrieve the string
|
// Retrieve the string
|
||||||
const auto & s = retrieve(*first);
|
const auto & s = retrieve(*first);
|
||||||
// Compare the tag
|
// Compare the tag
|
||||||
if (s.size() > len && (s.compare(s.size() - len, len, str) == 0) == neg)
|
if (s.size() >= len && (s.compare(s.size() - len, len, str) == 0) == neg)
|
||||||
{
|
{
|
||||||
collect(*first);
|
collect(*first);
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ void FirstBegins(Iterator first, Iterator last,
|
|||||||
// Retrieve the string
|
// Retrieve the string
|
||||||
const auto & s = retrieve(*first);
|
const auto & s = retrieve(*first);
|
||||||
// Compare the string
|
// Compare the string
|
||||||
if (s.size() > len && (s.compare(0, len, str) == 0) == neg)
|
if (s.size() >= len && (s.compare(0, len, str) == 0) == neg)
|
||||||
{
|
{
|
||||||
receive(*first);
|
receive(*first);
|
||||||
break;
|
break;
|
||||||
@ -177,7 +177,7 @@ void FirstEnds(Iterator first, Iterator last,
|
|||||||
// Retrieve the string
|
// Retrieve the string
|
||||||
const auto & s = retrieve(*first);
|
const auto & s = retrieve(*first);
|
||||||
// Compare the string
|
// Compare the string
|
||||||
if (s.size() > len && (s.compare(s.size() - len, len, str) == 0) == neg)
|
if (s.size() >= len && (s.compare(s.size() - len, len, str) == 0) == neg)
|
||||||
{
|
{
|
||||||
receive(*first);
|
receive(*first);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user