diff --git a/AK/StringView.h b/AK/StringView.h index c8874333add..7906ccf6f44 100644 --- a/AK/StringView.h +++ b/AK/StringView.h @@ -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); }