mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
AK: Assert non-empty Utf32View, when initialized with non-zero length
This was useful in debugging a nullptr dereference, which was happening through later, but was caused by this inconsistent initialization.
This commit is contained in:
parent
49cd03be95
commit
e0f4fdc9b4
1 changed files with 1 additions and 0 deletions
|
@ -39,6 +39,7 @@ public:
|
||||||
: m_codepoints(codepoints)
|
: m_codepoints(codepoints)
|
||||||
, m_length(length)
|
, m_length(length)
|
||||||
{
|
{
|
||||||
|
ASSERT(codepoints || length == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32* codepoints() const { return m_codepoints; }
|
const u32* codepoints() const { return m_codepoints; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue