vcl: better check in GraphiteLayout::expandOrCondense:

Improves the commit d066f7e4af that
fixed crash when printing the bugdoc from i#103958
This commit is contained in:
Petr Mladek 2012-03-20 11:35:13 +01:00
parent 7b9ea611be
commit 3a878d3dbf

View file

@ -847,7 +847,7 @@ void GraphiteLayout::expandOrCondense(ImplLayoutArgs &rArgs)
assert(nCharIndex > -1);
mvCharDxs[nCharIndex-mnMinCharPos] += nOffset;
// adjust char dxs for rest of characters in cluster
while (++nCharIndex < static_cast<int>(mvChar2BaseGlyph.size()))
while (++nCharIndex - mnMinCharPos < static_cast<int>(mvChar2BaseGlyph.size()))
{
int nChar2Base = mvChar2BaseGlyph[nCharIndex-mnMinCharPos];
if (nChar2Base == -1 || nChar2Base == static_cast<int>(i))