2
0
mirror of https://github.com/boostorg/url.git synced 2026-01-19 04:42:15 +00:00

chore: ci_is_equal slow path is fixed

This commit is contained in:
Vinnie Falco
2025-11-16 11:31:02 -08:00
parent cbaf493668
commit b5a940fbc1
2 changed files with 6 additions and 3 deletions

View File

@@ -40,14 +40,14 @@ ci_is_equal(
goto slow;
}
return true;
slow:
do
{
a = *p1++;
b = *p2++;
slow:
if( to_lower(a) !=
to_lower(b))
return false;
a = *p1++;
b = *p2++;
}
while(n--);
return true;

View File

@@ -88,6 +88,9 @@ public:
BOOST_TEST(ci_equal{}("abc", "ABC"));
BOOST_TEST(! ci_equal{}("xz", "abc"));
// slow case
BOOST_TEST(ci_is_equal("/x", "/X"));
}
void