From 9f99e285d15a212e74dbf5204df1911134db9741 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 15 Sep 2019 15:46:40 +0200 Subject: [PATCH] Utf8View: Don't print potentially unterminated string in debug message --- AK/Utf8View.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/Utf8View.cpp b/AK/Utf8View.cpp index f1cfd077f8..b63f674c9a 100644 --- a/AK/Utf8View.cpp +++ b/AK/Utf8View.cpp @@ -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) {