Преглед на файлове

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

Andreas Kling преди 5 години
родител
ревизия
9f99e285d1
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      AK/Utf8View.cpp

+ 1 - 1
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) {