瀏覽代碼

* don't call blockwrite if there's nothing to write

git-svn-id: trunk@6166 -
Jonas Maebe 19 年之前
父節點
當前提交
e1c994a3be
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      compiler/ppu.pas

+ 2 - 1
compiler/ppu.pas

@@ -836,7 +836,8 @@ end;
 
 
 procedure tppufile.writebuf;
 procedure tppufile.writebuf;
 begin
 begin
-  if not crc_only then
+  if not crc_only and
+     (bufidx <> 0) then
     blockwrite(f,buf^,bufidx);
     blockwrite(f,buf^,bufidx);
   inc(bufstart,bufidx);
   inc(bufstart,bufidx);
   bufidx:=0;
   bufidx:=0;