summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-08-28 13:12:25 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-08-29 20:12:53 +0000
commitcbcd7f88c2f800ac5fc95670eba26730d389c92f (patch)
tree46e1448b4b840b6a04753b64498a42be6a1d7c4c
parent062bb3675bf05e5a8150bddb7b4c0e404961fa13 (diff)
vcl: fix drmemory warning in UniscribeLayout::DropGlyph()
It says there's access to uninitialized variable on that line, so propbably the loop is running over. Change-Id: I0226f82b20a6fbbc79af5bbb46af09830c3bc25a (cherry picked from commit eba9a6c4b32220dcc729c71e440234f90af5bdcc) Reviewed-on: https://gerrit.libreoffice.org/18107 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/win/source/gdi/winlayout.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 51c77c0a81cb..22b6881c7bca 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -1495,7 +1495,7 @@ void UniscribeLayout::DropGlyph( int nStartx8 )
DBG_ASSERT( nStart <= mnGlyphCount, "USPLayout::DropG overflow" );
int j = pVI->mnMinGlyphPos;
- while (mpOutGlyphs[j] == DROPPED_OUTGLYPH) j++;
+ while (j < mnGlyphCount && mpOutGlyphs[j] == DROPPED_OUTGLYPH) j++;
if (j == nStart)
{
pVI->mnXOffset += ((mpJustifications)? mpJustifications[nStart] : mpGlyphAdvances[nStart]);