From 3ba27d3160fbe4b4600b85a4dae0869849598a46 Mon Sep 17 00:00:00 2001 From: Sven/Sarah Barth Date: Mon, 30 Dec 2024 19:42:41 +0100 Subject: [PATCH] * ensure that current_settings.pmessage is reset when doing a replay and when loading the current message state from the token stream --- compiler/scanner.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/scanner.pas b/compiler/scanner.pas index 164f5d1d76..551c59bd78 100644 --- a/compiler/scanner.pas +++ b/compiler/scanner.pas @@ -3721,6 +3721,9 @@ type { install buffer } replaytokenbuf:=buf; + { ensure that existing message state records won't be freed } + current_settings.pmessage:=nil; + { flushpendingswitchesstate should have been called } if assigned(pendingstate.nextmessagerecord) then internalerror(2024122901); @@ -3863,7 +3866,8 @@ type end; ST_LOADMESSAGES: begin - { free pending messages } + { free current and pending messages } + FreeLocalVerbosity(current_settings.pmessage); FreeLocalVerbosity(pendingstate.nextmessagerecord); { the message settings are stored from newest to oldest change for the whole stack, so we only want to apply