소스 검색

* 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 18 년 전
부모
커밋
1445ca1198
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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);