sw/source/core/txtnode/fntcache.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 5fd0c2328f8c78a1f63a38156d15ebdf8d9b4590 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Mar 2 11:33:24 2018 +0000 forcepoint #17 nTextBreak is an index into pKernArray of len rInf.GetLen() Change-Id: I3afeaf987cc5e75362560165fea7230904530933 Reviewed-on: https://gerrit.libreoffice.org/50628 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 599452c0b5a3..842c91002989 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -2347,9 +2347,8 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo const & rInf, long nTextWidth ) rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray.get(), rInf.GetIdx(), rInf.GetLen() ); long nCurrPos = pKernArray[nTextBreak] + nGridWidthAdd; - while( nTextBreak < rInf.GetLen() && nTextWidth >= nCurrPos) + while (++nTextBreak < rInf.GetLen() && nTextWidth >= nCurrPos) { - nTextBreak++; nCurrPos = pKernArray[nTextBreak] + nGridWidthAdd * ( nTextBreak + 1 ); } return nTextBreak + rInf.GetIdx(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits