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

GenericSalLayout::KashidaJustify: fix infinite loop

insert() inserts before the given iterator and returns iterator to newly
inserted element, hence need to increment that iterator
(regression from 6bb68cae)
üst d99a715e
...@@ -1201,6 +1201,7 @@ void GenericSalLayout::KashidaJustify( long nKashidaIndex, int nKashidaWidth ) ...@@ -1201,6 +1201,7 @@ void GenericSalLayout::KashidaJustify( long nKashidaIndex, int nKashidaWidth )
{ {
pG2 = m_GlyphItems.insert(pG2, GlyphItem( pG->mnCharPos, nKashidaIndex, aPos, pG2 = m_GlyphItems.insert(pG2, GlyphItem( pG->mnCharPos, nKashidaIndex, aPos,
GlyphItem::IS_IN_CLUSTER|GlyphItem::IS_RTL_GLYPH, nKashidaWidth )); GlyphItem::IS_IN_CLUSTER|GlyphItem::IS_RTL_GLYPH, nKashidaWidth ));
++pG2;
aPos.X() += nKashidaWidth; aPos.X() += nKashidaWidth;
} }
...@@ -1209,6 +1210,7 @@ void GenericSalLayout::KashidaJustify( long nKashidaIndex, int nKashidaWidth ) ...@@ -1209,6 +1210,7 @@ void GenericSalLayout::KashidaJustify( long nKashidaIndex, int nKashidaWidth )
{ {
pG2 = m_GlyphItems.insert(pG2, GlyphItem( pG->mnCharPos, nKashidaIndex, aPos, pG2 = m_GlyphItems.insert(pG2, GlyphItem( pG->mnCharPos, nKashidaIndex, aPos,
GlyphItem::IS_IN_CLUSTER|GlyphItem::IS_RTL_GLYPH, nKashidaCount ? nGapWidth : nGapWidth/2 )); GlyphItem::IS_IN_CLUSTER|GlyphItem::IS_RTL_GLYPH, nKashidaCount ? nGapWidth : nGapWidth/2 ));
++pG2;
aPos.X() += nGapWidth; aPos.X() += nGapWidth;
} }
pG = pG2; pG = pG2;
......
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