fdo#50169: band-aid another crash in GraphiteLayout::expandOrCondense:

error: attempt to subscript container with out-of-bounds index 6,
but container only holds 6 elements.
This commit is contained in:
Michael Stahl
2012-05-25 22:43:29 +02:00
parent b6db1e0683
commit b8452a89ce

View File

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