浏览代码

--- Merging r17660 into '.':
U compiler/cfileutl.pas

# revisions: 17660
------------------------------------------------------------------------
r17660 | florian | 2011-06-05 00:14:55 +0200 (Sun, 05 Jun 2011) | 1 line
Changed paths:
M /trunk/compiler/cfileutl.pas

* fix potential range check error in cfileutl, should resolve #19405
------------------------------------------------------------------------

git-svn-id: branches/fixes_2_4@17675 -

marco 14 年之前
父节点
当前提交
3f18ce5b2c
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      compiler/cfileutl.pas

+ 4 - 4
compiler/cfileutl.pas

@@ -52,7 +52,7 @@ interface
         FDirectoryEntries : TFPHashList;
         FCached : Boolean;
         procedure FreeDirectoryEntries;
-        function GetItemAttr(const AName: TCmdStr): byte;
+        function GetItemAttr(const AName: TCmdStr): longint;
         function TryUseCache: boolean;
         procedure ForceUseCache;
         procedure Reload;
@@ -236,7 +236,7 @@ end;
       end;
 
 
-    function TCachedDirectory.GetItemAttr(const AName: TCmdStr): byte;
+    function TCachedDirectory.GetItemAttr(const AName: TCmdStr): longint;
       var
         entry: PCachedDirectoryEntry;
       begin
@@ -523,8 +523,8 @@ end;
         if (length(s)>0) and (s[1] in AllowDirectorySeparators) then
           result:=true;
 {$elseif defined(amiga) or defined(morphos)}
-        (* An Amiga path is absolute, if it has a volume/device name in it (contains ":"), 
-           otherwise it's always a relative path, no matter if it starts with a directory 
+        (* An Amiga path is absolute, if it has a volume/device name in it (contains ":"),
+           otherwise it's always a relative path, no matter if it starts with a directory
            separator or not. (KB) *)
         if (length(s)>0) and (Pos(':',s) <> 0) then
           result:=true;