Kaydet (Commit) b8452a89 authored tarafından Michael Stahl's avatar Michael Stahl

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.
üst b6db1e06
......@@ -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()))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment