From 5c01377ea66f530eced7620c7a5e960450e1fe55 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Fri, 18 Feb 2011 14:56:22 +0000 Subject: [PATCH] Fixed: wrong section was selected in EndSection for X2UtPersistXML --- X2UtPersistXML.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/X2UtPersistXML.pas b/X2UtPersistXML.pas index 472e205..44102f4 100644 --- a/X2UtPersistXML.pas +++ b/X2UtPersistXML.pas @@ -192,8 +192,10 @@ begin if SectionStack.Count > 0 then begin - FSection := (SectionStack[Pred(SectionStack.Count)] as IXMLSection); - SectionStack.Delete(Pred(SectionStack.Count)); + lastItem := Pred(SectionStack.Count); + + FSection := (SectionStack[Pred(lastItem)] as IXMLSection); + SectionStack.Delete(lastItem); end; end;