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
|
||||
const auto & s = retrieve(*first);
|
||||
// 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);
|
||||
}
|
||||
@ -90,7 +90,7 @@ void EachEnds(Iterator first, Iterator last,
|
||||
// Retrieve the string
|
||||
const auto & s = retrieve(*first);
|
||||
// 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);
|
||||
}
|
||||
@ -151,7 +151,7 @@ void FirstBegins(Iterator first, Iterator last,
|
||||
// Retrieve the string
|
||||
const auto & s = retrieve(*first);
|
||||
// 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);
|
||||
break;
|
||||
@ -177,7 +177,7 @@ void FirstEnds(Iterator first, Iterator last,
|
||||
// Retrieve the string
|
||||
const auto & s = retrieve(*first);
|
||||
// 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);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user