diff options
author | Kevin Meyer <kevinmeyer@me.com> | 2020-06-13 00:04:17 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-15 22:32:18 +0200 |
commit | e0f4fdc9b4b7d1319d8ba6d4ae07c651ec85e091 (patch) | |
tree | f0489940b954a927c0989cf4859714fb0fa319d0 /AK | |
parent | 49cd03be9559c2c5c92ca35a7268639ee17a1257 (diff) | |
download | serenity-e0f4fdc9b4b7d1319d8ba6d4ae07c651ec85e091.zip |
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.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/Utf32View.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/AK/Utf32View.h b/AK/Utf32View.h index 89c0eefcea..25f4c4a828 100644 --- a/AK/Utf32View.h +++ b/AK/Utf32View.h @@ -39,6 +39,7 @@ public: : m_codepoints(codepoints) , m_length(length) { + ASSERT(codepoints || length == 0); } const u32* codepoints() const { return m_codepoints; } |