AK: Verify that we are not overreaching in StringView's substring_view()

This commit is contained in:
Hendiadyoin1 2021-10-24 23:29:42 +02:00 committed by Linus Groh
parent a164e6ecbb
commit 6cb42d8a40
Notes: sideshowbarker 2024-07-18 01:05:28 +09:00

View file

@ -110,6 +110,8 @@ public:
[[nodiscard]] constexpr StringView substring_view(size_t start) const
{
if (!is_constant_evaluated())
VERIFY(start <= length());
return substring_view(start, length() - start);
}