I was very carefull at this part and made lots of tests... You can try with your local tests, shouldn't be worse than before:) I am going to update the wiki page first.
--zou On Dec 3, 2007 3:33 PM, strk <[EMAIL PROTECTED]> wrote: > On Mon, Dec 03, 2007 at 07:06:15AM +0000, Zou Lunkai wrote: > > > +void > > +DisplayList::mergeDisplayList(DisplayList & newList) > > +{ > > + testInvariant(); > > + > > + iterator itOld = beginNonRemoved(_charsByDepth); > > + iterator itNew = beginNonRemoved(newList._charsByDepth); > > + > > + iterator itOldEnd = staticZoneEnd(_charsByDepth); > > + iterator itNewEnd = staticZoneEnd(newList._charsByDepth); > > + > > + while( itOld != itOldEnd ) > > + { > ... > > + while( itNew != itNewEnd ) > > + { > ... > > + _charsByDepth.erase(itOldBack); > > I'm not sure it is safe to use itOldBack again after this erase > (it' used as the while condition) > > > + // replace the old character with the > > character in the new depth > > + _charsByDepth.insert(itOldBack, > > *itNewBack); > > + _charsByDepth.erase(itOldBack); > > Same here, both insert and erase would make itOldBack not point to the end > anymore. > > > + > > newList._charsByDepth.erase(itNewBack); > > This would apply to itNewBack... > > > + _charsByDepth.insert(itOldBack, *itNewBack ); > > and here. > > > + // unload remaining characters in old list > > + while( itOld != itOldEnd ) > > + { > > What would itOldEnd point to after all possible modifications above ? > > > + // add remaining characters in new list to the old list > > + if( itNew != itNewEnd ) > > + { > > Same here... > > --strk; > _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit