changeset 4606:a17dd6e20b79

Fix valgrind complain.
author Sebastian Geerken
date So, 26 Jun 2016 14:22:19 +0200
parents 21672c06596c
children eb21d16531ce
files dw/textblock.cc
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dw/textblock.cc	So Jun 26 01:44:33 2016 +0200
+++ b/dw/textblock.cc	So Jun 26 14:22:19 2016 +0200
@@ -2292,8 +2292,13 @@
       
       // Since the child widget will regard floats, we do not have to include
       // floats when calculating left and right border.
+
+      // TODO Actually line1OffsetEff should be used instead of line1Offset, but
+      // it may not initialized here. Anyway, since ignoreLine1OffsetSometimes
+      // is not used, line1OffsetEff is always equal to line1Offset.
+      
       int leftBorder = boxOffsetX () + leftInnerPadding
-         + (lines->size () == 0 ? line1OffsetEff : 0);
+         + (lines->size () == 0 ? line1Offset /* ...Eff, actually */ : 0);
       int rightBorder = boxRestWidth ();
       
       int lastMargin, yLine = yOffsetOfLineToBeCreated (&lastMargin);