Browse Source

* fix from Michalis K. for nesting depth of XMLs (# 11957)

git-svn-id: trunk@11644 -
marco 17 years ago
parent
commit
622ace494e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/fcl-xml/src/xmlread.pp

+ 2 - 2
packages/fcl-xml/src/xmlread.pp

@@ -2979,9 +2979,9 @@ end;
 
 procedure TXMLReader.PushVC(aElDef: TDOMElementDef);
 begin
-  if FNesting = Length(FValidator) then
-    SetLength(FValidator, FNesting * 2);
   Inc(FNesting);
+  if FNesting >= Length(FValidator) then
+    SetLength(FValidator, FNesting * 2);
   FValidator[FNesting].FElementDef := aElDef;
   FValidator[FNesting].FCurCP := nil;
   FValidator[FNesting].FFailed := False;