diff --git a/fcl/passrc/pparser.pp b/fcl/passrc/pparser.pp
index b01263f2f6..551b3ed22b 100644
--- a/fcl/passrc/pparser.pp
+++ b/fcl/passrc/pparser.pp
@@ -631,7 +631,7 @@ var
   TypeEl: TPasType;
   ClassEl: TPasClassType;
   List: TList;
-  i: Integer;
+  i,j: Integer;
   VarEl: TPasVariable;
 begin
   Module := nil;
@@ -716,11 +716,11 @@ begin
                       if CompareText(ClassEl.Name, TypeEl.Name) = 0 then
                       begin
                         Section.Classes.Delete(i);
-                        for i := 0 to Section.Declarations.Count - 1 do
+                        for j := 0 to Section.Declarations.Count - 1 do
                           if CompareText(TypeEl.Name,
-                            TPasElement(Section.Declarations[i]).Name) = 0 then
+                            TPasElement(Section.Declarations[j]).Name) = 0 then
                           begin
-                            Section.Declarations.Delete(i);
+                            Section.Declarations.Delete(j);
                             break;
                           end;
                         ClassEl.Release;
@@ -1822,7 +1822,10 @@ end.
 
 {
   $Log$
-  Revision 1.7  2004-07-23 23:40:35  michael
+  Revision 1.8  2004-09-13 16:02:36  peter
+    * fix nested for-loop with same index
+
+  Revision 1.7  2004/07/23 23:40:35  michael
   + Fixed value of constant strings (added quotes)
 
   Revision 1.6  2004/05/16 13:24:59  peter
diff --git a/utils/fpdoc/makeskel.pp b/utils/fpdoc/makeskel.pp
index d96e99bf32..910a2c02c0 100644
--- a/utils/fpdoc/makeskel.pp
+++ b/utils/fpdoc/makeskel.pp
@@ -276,7 +276,7 @@ end;
 
 
 var
-  i: Integer;
+  i,j: Integer;
   Module: TPasModule;
   
 begin
@@ -318,8 +318,8 @@ begin
        try
          Engine.SetPackageName(PackageName);
          if UpdateMode then
-           For I:=0 to DescrFiles.Count-1 do
-             Engine.AddDocFile(DescrFiles[i]);
+           For j:=0 to DescrFiles.Count-1 do
+             Engine.AddDocFile(DescrFiles[j]);
          Module := ParseSource(Engine, InputFiles[i], OSTarget, CPUTarget);
    	 WriteLn(f, '</module> <!-- ', Module.Name, ' -->');
        except
@@ -349,7 +349,10 @@ end.
 
 {
   $Log$
-  Revision 1.12  2004-08-29 15:32:41  michael
+  Revision 1.13  2004-09-13 16:04:52  peter
+    * fix nested for-loop with same index
+
+  Revision 1.12  2004/08/29 15:32:41  michael
   + More intelligent handling of nodes. Do not write unused nodes.
 
   Revision 1.11  2004/08/28 18:18:59  michael