소스 검색

* Only flush when actually writing

Michaël Van Canneyt 11 달 전
부모
커밋
e2be33b4be
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      packages/fcl-json/src/jsonconf.pp

+ 3 - 1
packages/fcl-json/src/jsonconf.pp

@@ -186,8 +186,10 @@ begin
       else
         S:=FJSON.AsJSON;
       if S>'' then
+        begin
         F.WriteBuffer(S[1],Length(S));  
-      F.Flush;
+        F.Flush;
+        end;
     Finally
       F.Free;
     end;