Browse Source

* more safe put implementation

git-svn-id: trunk@24263 -
florian 12 years ago
parent
commit
f97cd6997c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      rtl/inc/iso7185.pp

+ 4 - 0
rtl/inc/iso7185.pp

@@ -132,8 +132,12 @@ unit iso7185;
 
 
     Procedure Put(var t : Text);
+      type
+        FileFunc = Procedure(var t : TextRec);
       begin
         inc(TextRec(t).BufPos);
+        If TextRec(t).BufPos>=TextRec(t).BufSize Then
+          FileFunc(TextRec(t).InOutFunc)(TextRec(t));
       end;