소스 검색

* don't call the system if flush hasn't to flush anything

git-svn-id: trunk@4829 -
florian 19 년 전
부모
커밋
6f968732c0
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      rtl/inc/text.inc

+ 3 - 0
rtl/inc/text.inc

@@ -33,6 +33,9 @@ Procedure FileWriteFunc(var t:TextRec);
 var
   i : longint;
 Begin
+  { prevent unecessary system call }
+  if t.BufPos=0 then
+    exit;
   i:=Do_Write(t.Handle,t.Bufptr,t.BufPos);
   if i<>t.BufPos then
     InOutRes:=101;