diff --git a/AK/Utf32View.h b/AK/Utf32View.h index cdb5f4be195..d210ec7eafc 100644 --- a/AK/Utf32View.h +++ b/AK/Utf32View.h @@ -94,9 +94,7 @@ public: Utf32View substring_view(size_t offset, size_t length) const { - if (length == 0) - return {}; - VERIFY(offset < m_length); + VERIFY(offset <= m_length); VERIFY(!Checked::addition_would_overflow(offset, length)); VERIFY((offset + length) <= m_length); return Utf32View(m_code_points + offset, length);