Browse Source

* Only flush when actually writing

Michaël Van Canneyt 10 months ago
parent
commit
e2be33b4be
1 changed files with 3 additions and 1 deletions
  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;