diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-09-25 20:06:50 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-09-25 20:06:50 +0000 |
commit | 30dc6aaf878b2c55efcf7598fdb8886e06d14e01 (patch) | |
tree | 2de58de8c2eddd4efb5dc8a8c5b54cd3faad4972 /core/fxcodec/codec/ccodec_faxmodule.cpp | |
parent | 958142efa4561b5efd52733ad6c3b889cf49b3ae (diff) | |
download | pdfium-30dc6aaf878b2c55efcf7598fdb8886e06d14e01.tar.xz |
Add FxAlignToBoundary<>() template helper function.
Because I nearly botched this trivial calculation in the previous CL.
Change-Id: I7438f9d3476d93b7899c2d7d761234769f53f9e3
Reviewed-on: https://pdfium-review.googlesource.com/43010
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_faxmodule.cpp')
-rw-r--r-- | core/fxcodec/codec/ccodec_faxmodule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxcodec/codec/ccodec_faxmodule.cpp b/core/fxcodec/codec/ccodec_faxmodule.cpp index 423dfe6857..fe9f6a9e2e 100644 --- a/core/fxcodec/codec/ccodec_faxmodule.cpp +++ b/core/fxcodec/codec/ccodec_faxmodule.cpp @@ -530,7 +530,7 @@ uint8_t* CCodec_FaxDecoder::v_GetNextLine() { if (m_bByteAlign && m_bitpos < bitsize) { int bitpos0 = m_bitpos; - int bitpos1 = (m_bitpos + 7) / 8 * 8; + int bitpos1 = FxAlignToBoundary<8>(m_bitpos); while (m_bByteAlign && bitpos0 < bitpos1) { int bit = m_SrcSpan[bitpos0 / 8] & (1 << (7 - bitpos0 % 8)); if (bit != 0) |