浏览代码

* in ISO mode, f^ is undefined after Rewrite

git-svn-id: trunk@41429 -
florian 6 年之前
父节点
当前提交
74275a9173
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      rtl/inc/text.inc

+ 2 - 0
rtl/inc/text.inc

@@ -1858,6 +1858,8 @@ procedure fpc_Read_Text_Char_intern(var f : Text; out c: char); iocheck; [extern
 function fpc_GetBuf_Text(var f : Text) : pchar; iocheck; compilerproc;
 function fpc_GetBuf_Text(var f : Text) : pchar; iocheck; compilerproc;
 Begin
 Begin
   Result:=@TextRec(f).Bufptr^[TextRec(f).BufEnd];
   Result:=@TextRec(f).Bufptr^[TextRec(f).BufEnd];
+  if TextRec(f).mode=fmOutput then
+    exit;
   If not CheckRead(f) then
   If not CheckRead(f) then
     exit;
     exit;
   If TextRec(f).BufPos>=TextRec(f).BufEnd Then
   If TextRec(f).BufPos>=TextRec(f).BufEnd Then