Parcourir la source

* reset I/O result before and after the implicit close calls in ISO pascal mode,
this avoids further I/O operations to be carried out, resolves issue #32743

git-svn-id: trunk@38301 -

florian il y a 7 ans
Parent
commit
be158cec7a
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      rtl/inc/text.inc

+ 4 - 0
rtl/inc/text.inc

@@ -672,7 +672,11 @@ end;
 
 Procedure fpc_textclose_iso(var t : Text);compilerproc;
 begin
+  { reset inout result as this procedure is only called by the compiler and no I/O checking is carried out,
+    so further I/O does not fail }
+  inoutres:=0;
   close(t);
+  inoutres:=0;
 end;