diff --git a/AK/Debug.h.in b/AK/Debug.h.in index 5c315c6ab02..d252d5ef947 100644 --- a/AK/Debug.h.in +++ b/AK/Debug.h.in @@ -282,6 +282,10 @@ # cmakedefine01 LZMA_DEBUG #endif +#ifndef LZW_DEBUG +# cmakedefine01 LZW_DEBUG +#endif + #ifndef MALLOC_DEBUG # cmakedefine01 MALLOC_DEBUG #endif diff --git a/Meta/CMake/all_the_debug_macros.cmake b/Meta/CMake/all_the_debug_macros.cmake index af11c818162..0cbfaac6bad 100644 --- a/Meta/CMake/all_the_debug_macros.cmake +++ b/Meta/CMake/all_the_debug_macros.cmake @@ -110,6 +110,7 @@ set(LOCK_TRACE_DEBUG ON) set(LOOKUPSERVER_DEBUG ON) set(LOOPBACK_DEBUG ON) set(LZMA_DEBUG ON) +set(LZW_DEBUG ON) set(MALLOC_DEBUG ON) set(MARKDOWN_DEBUG ON) set(MATROSKA_DEBUG ON) diff --git a/Userland/Libraries/LibCompress/LZWDecoder.h b/Userland/Libraries/LibCompress/LZWDecoder.h index 19d24c7e459..21d30fdf710 100644 --- a/Userland/Libraries/LibCompress/LZWDecoder.h +++ b/Userland/Libraries/LibCompress/LZWDecoder.h @@ -60,12 +60,12 @@ public: m_current_code = TRY(m_bit_stream->template read_bits(m_code_size)); if (m_current_code > m_code_table.size()) { - dbgln_if(GIF_DEBUG, "Corrupted LZW stream, invalid code: {}, code table size: {}", + dbgln_if(LZW_DEBUG, "Corrupted LZW stream, invalid code: {}, code table size: {}", m_current_code, m_code_table.size()); return Error::from_string_literal("Corrupted LZW stream, invalid code"); } else if (m_current_code == m_code_table.size() && m_output.is_empty()) { - dbgln_if(GIF_DEBUG, "Corrupted LZW stream, valid new code but output buffer is empty: {}, code table size: {}", + dbgln_if(LZW_DEBUG, "Corrupted LZW stream, valid new code but output buffer is empty: {}, code table size: {}", m_current_code, m_code_table.size()); return Error::from_string_literal("Corrupted LZW stream, valid new code but output buffer is empty");