소스 검색

* 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 7 년 전
부모
커밋
be158cec7a
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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;