Browse Source

* CeateArray uses 0-based loop

git-svn-id: trunk@45264 -
michael 5 years ago
parent
commit
a03ea37cfc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-json/src/fpjsontopas.pp

+ 1 - 1
packages/fcl-json/src/fpjsontopas.pp

@@ -743,7 +743,7 @@ begin
   AddLn('');
   AddLn('');
   AddLn('begin');
   AddLn('begin');
   Indent;
   Indent;
-  AddLn('For I:=0 to Length(anArray) do');
+  AddLn('For I:=0 to Length(anArray)-1 do');
   Indent;
   Indent;
   if IM.JSONType=jtObject then
   if IM.JSONType=jtObject then
     AddLn('FreeAndNil(anArray[I]);')
     AddLn('FreeAndNil(anArray[I]);')