Skip to content

Commit 0267355

Browse files
committed
[[ Bug 21302 ]] Make message box 'put' statements immune to 'lock messages'
Wrap the sending of the message in `MCB_setmsg` with setting `MClockmessages` to `false` and then restoring to original value.
1 parent ae99f6e commit 0267355

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/notes/bugfix-21302.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Make message box 'put' statements immune to 'lock messages'

engine/src/debug.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ void MCB_setmsg(MCExecContext &ctxt, MCStringRef p_string)
140140

141141
if (t_target != nil)
142142
{
143+
Boolean oldlock = MClockmessages;
144+
MClockmessages = False;
145+
143146
MCAutoStringRef t_handler;
144147
t_handler = MCNameGetString(ctxt.GetHandler()->getname());
145148
MCParameter *t_handler_parameter = new (nothrow) MCParameter;
@@ -165,6 +168,8 @@ void MCB_setmsg(MCExecContext &ctxt, MCStringRef p_string)
165168

166169
if (t_added)
167170
MCnexecutioncontexts--;
171+
172+
MClockmessages = oldlock;
168173
}
169174

170175
if (t_stat == ES_NOT_HANDLED || t_stat == ES_PASS)

0 commit comments

Comments
 (0)