浏览代码

Return -1 if size of file is smaller tham header size in tppufile.readheader method

git-svn-id: trunk@49476 -
pierre 4 年之前
父节点
当前提交
4483343d00
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/ppu.pas

+ 1 - 1
compiler/ppu.pas

@@ -277,7 +277,7 @@ end;
 function tppufile.readheader: longint;
 begin
   if fsize<sizeof(tppuheader) then
-    exit(0);
+    exit(-1);
   result:=f.Read(header,sizeof(tppuheader));
   { The header is always stored in little endian order }
   { therefore swap if on a big endian machine          }