Utf8View: Don't print potentially unterminated string in debug message

This commit is contained in:
Andreas Kling 2019-09-15 15:46:40 +02:00
parent ecdaf991c6
commit 9f99e285d1
Notes: sideshowbarker 2024-07-19 12:06:16 +09:00

View file

@ -148,7 +148,7 @@ u32 Utf8CodepointIterator::operator*() const
bool first_byte_makes_sense = decode_first_byte(m_ptr[0], codepoint_length_in_bytes, codepoint_value_so_far);
if (!first_byte_makes_sense) {
dbg() << "First byte doesn't make sense, bytes = " << (const char*)m_ptr;
dbg() << "First byte doesn't make sense, bytes: " << StringView((const char*)m_ptr, m_length);
}
ASSERT(first_byte_makes_sense);
if (codepoint_length_in_bytes > m_length) {