diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-06-04 13:48:59 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-04 16:30:22 +0200 |
commit | e18f53c624443bb2fbb9edba7b81b57487eb0e50 (patch) | |
tree | 024da63cfb6d4c49438997d7c41edb4a9f48d74d /vcl | |
parent | 981fd1612fb853287f0bb916b8600de3e587ed64 (diff) |
fdo#50169: skip the rest of the loop in case of wrong index
Presumably that is what Martin wanted to do in the previous patch.
Change-Id: I64f1da88c1802a27cf974aa6abc15b014b56126d
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/glyphs/graphite_layout.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 6416f70be051..e3bd926492ed 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -849,12 +849,13 @@ void GraphiteLayout::expandOrCondense(ImplLayoutArgs &rArgs) nOffset = static_cast<int>(fExtraPerCluster * nCluster); int nCharIndex = mvGlyph2Char[i]; assert(nCharIndex > -1); - if (nCharIndex < mnMinCharPos) continue; - if (static_cast<size_t>(nCharIndex-mnMinCharPos) - < mvCharDxs.size()) + if (nCharIndex < mnMinCharPos || + static_cast<size_t>(nCharIndex-mnMinCharPos) + >= mvCharDxs.size()) { - mvCharDxs[nCharIndex-mnMinCharPos] += nOffset; + continue; } + mvCharDxs[nCharIndex-mnMinCharPos] += nOffset; // adjust char dxs for rest of characters in cluster while (++nCharIndex - mnMinCharPos < static_cast<int>(mvChar2BaseGlyph.size())) { |