diff options
-rw-r--r-- | core/fxcodec/codec/fx_codec_fax.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp index 4a70b5302e..0a6ba3a793 100644 --- a/core/fxcodec/codec/fx_codec_fax.cpp +++ b/core/fxcodec/codec/fx_codec_fax.cpp @@ -544,8 +544,10 @@ uint8_t* CCodec_FaxDecoder::v_GetNextLine() { m_bitpos = bitpos1; } if (m_bBlack) { - for (uint32_t i = 0; i < m_Pitch; ++i) - m_ScanlineBuf[i] = ~m_ScanlineBuf[i]; + ASSERT(m_Pitch == m_ScanlineBuf.size()); + uint8_t* data = m_ScanlineBuf.data(); + for (size_t i = 0; i < m_ScanlineBuf.size(); ++i) + data[i] = ~data[i]; } return m_ScanlineBuf.data(); } |