Browse Source

* fix error as reported in webbug 2373

pierre 22 years ago
parent
commit
8caf047fa8
1 changed files with 3 additions and 3 deletions
  1. 3 3
      docs/sysutex/ex45.pp

+ 3 - 3
docs/sysutex/ex45.pp

@@ -8,15 +8,15 @@ Uses sysutils;
 Var Dirs : Array[0..127] of pchar;
 Var Dirs : Array[0..127] of pchar;
     I,Count : longint;
     I,Count : longint;
     Dir,NewDir : String;
     Dir,NewDir : String;
- 
+
 Begin
 Begin
   Dir:=GetCurrentDir;
   Dir:=GetCurrentDir;
   Writeln ('Dir : ',Dir);
   Writeln ('Dir : ',Dir);
   NewDir:='';
   NewDir:='';
   count:=GetDirs(Dir,Dirs);
   count:=GetDirs(Dir,Dirs);
-  For I:=0 to Count do
+  For I:=0 to Count-1 do
     begin
     begin
     NewDir:=NewDir+'/'+StrPas(Dirs[I]);
     NewDir:=NewDir+'/'+StrPas(Dirs[I]);
     Writeln (NewDir);
     Writeln (NewDir);
     end;
     end;
-End.
+End.