浏览代码

* when restoring the state after parsing the last token of the token buffer append the message state to the pending state so that they are reapplied at the correct time

Sven/Sarah Barth 11 月之前
父节点
当前提交
f2d41e680b
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      compiler/scanner.pas

+ 4 - 0
compiler/scanner.pas

@@ -3772,6 +3772,10 @@ type
             change_endian_for_replay:=replaystack.tokenbuf_needs_swapping;
             change_endian_for_replay:=replaystack.tokenbuf_needs_swapping;
             { restore compiler settings }
             { restore compiler settings }
             current_settings:=replaystack.settings;
             current_settings:=replaystack.settings;
+            if assigned(pendingstate.nextmessagerecord) then
+              FreeLocalVerbosity(pendingstate.nextmessagerecord);
+            pendingstate.nextmessagerecord:=current_settings.pmessage;
+            current_settings.pmessage:=nil;
             popreplaystack;
             popreplaystack;
 {$ifdef check_inputpointer_limits}
 {$ifdef check_inputpointer_limits}
             if assigned(hidden_inputpointer) then
             if assigned(hidden_inputpointer) then