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