codetools: fixed FileIsText, bug #18692

git-svn-id: trunk@29408 -
This commit is contained in:
mattias 2011-02-07 10:07:58 +00:00
parent 0c415f0a1d
commit 6c152e5c94

View File

@ -1141,8 +1141,8 @@ begin
try
// read the first 1024 bytes
Len:=1024;
SetLength(Buf,1024+1);
Len:=fs.Read(Buf[1],length(Buf));
SetLength(Buf,Len+1);
Len:=fs.Read(Buf[1],Len);
if Len>0 then begin
Buf[Len+1]:=#0;
p:=PChar(Buf);