mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:54:58 +00:00
AK: Verify that we are not overreaching in StringView's substring_view()
This commit is contained in:
parent
a164e6ecbb
commit
6cb42d8a40
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue