diff --git a/src/ParagraphMetrics.cpp b/src/ParagraphMetrics.cpp index e213da6851..15fb8e2f4d 100644 --- a/src/ParagraphMetrics.cpp +++ b/src/ParagraphMetrics.cpp @@ -94,15 +94,15 @@ size_type ParagraphMetrics::calculateRowSignature(Row const & row, boost::crc_32_type crc; for (pos_type i = row.pos(); i < row.endpos(); ++i) { char_type const b[] = { par_->getChar(i) }; - crc.process_bytes(b, 1); + crc.process_bytes(b, sizeof(char_type)); if (bparams.trackChanges) { Change change = par_->lookupChange(i); char_type const b[] = { change.type }; crc.process_bytes(b, 1); } } - char_type const b[] = { row.width(), row.ascent(), row.descent()}; - crc.process_bytes(b, 3); + int const b[] = { row.width(), row.ascent(), row.descent()}; + crc.process_bytes(b, 3 * sizeof(int)); return crc.checksum(); } diff --git a/status.15x b/status.15x index f1554779ae..b3fb651a6b 100644 --- a/status.15x +++ b/status.15x @@ -162,6 +162,8 @@ What's new - Disallow paragraph breaks in optional arguments (aka short title) (bug 4359). +- Fix calculation of row metrics with multibyte characters. + * DOCUMENTATION