mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
AK: Verify that we are not overreaching in StringView's substring_view()
This commit is contained in:
parent
a164e6ecbb
commit
6cb42d8a40
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue