commit 81badf8550f2fd5e614a22261c4885d747a72106
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Fri Nov 14 11:13:38 2014 +0100

    Fix overflow of inset over text (see #9224)
    
    The symptoms are the same as the original #9224, but the reason is 
different. In the new code, the width of justified rows includes the 
Row::separator value. Therefore the CRC computed in 
ParagrahMetrics::computeRowSignature is not updated in some cases.
    
    The fix is to add Row::separator as one of the elements of the row crc.

diff --git a/src/ParagraphMetrics.cpp b/src/ParagraphMetrics.cpp
index 97170bb..a911d14 100644
--- a/src/ParagraphMetrics.cpp
+++ b/src/ParagraphMetrics.cpp
@@ -97,13 +97,16 @@ size_t ParagraphMetrics::computeRowSignature(Row const & 
row,
                        char_type const b[] = { 
static_cast<char_type>(change.type) };
                        // 1 byte is enough to encode Change::Type
                        crc.process_bytes(b, 1);
-               }                       
+               }
        }
 
        Dimension const & d = row.dimension();
        char_type const b[] = { static_cast<char_type>(row.sel_beg),
-                               static_cast<char_type>(row.sel_end),
-               row.begin_margin_sel, row.end_margin_sel, d.wid, d.asc, d.des};
+                               static_cast<char_type>(row.sel_end),
+                               row.begin_margin_sel,
+                               row.end_margin_sel,
+                               row.separator,
+                               d.wid, d.asc, d.des };
        crc.process_bytes(b, sizeof(b));
 
        return crc.checksum();

Reply via email to