mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +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
Notes:
sideshowbarker
2024-07-19 05:38:11 +09:00
Author: https://github.com/kevmeyer Commit: https://github.com/SerenityOS/serenity/commit/e0f4fdc9b4b Pull-request: https://github.com/SerenityOS/serenity/pull/2551 Reviewed-by: https://github.com/FalseHonesty Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 0 deletions
|
@ -39,6 +39,7 @@ public:
|
|||
: m_codepoints(codepoints)
|
||||
, m_length(length)
|
||||
{
|
||||
ASSERT(codepoints || length == 0);
|
||||
}
|
||||
|
||||
const u32* codepoints() const { return m_codepoints; }
|
||||
|
|
Loading…
Reference in a new issue