Pārlūkot izejas kodu

* fixed GetDirs in case the last character of the passed directory
= PathDelim (called like that from the compiler)

git-svn-id: trunk@9274 -

Jonas Maebe 17 gadi atpakaļ
vecāks
revīzija
1445ca1198
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      rtl/objpas/sysutils/fina.inc

+ 3 - 1
rtl/objpas/sysutils/fina.inc

@@ -192,7 +192,9 @@ begin
   Result:=-1;
   While I<=Length(DirName) do
     begin
-    If DirName[i]=PathDelim then
+    If (DirName[i]=PathDelim) and
+       { avoid error in case last char=pathdelim }
+       (length(dirname)>i) then
       begin
       DirName[i]:=#0;
       Inc(Result);