From fed099c4ccb1ae59a8a7fe2ae14fa4ef4b85bd01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C?= Date: Tue, 1 Oct 2024 11:47:02 +0800 Subject: [PATCH] Fix isRecursiveCall failing on flyout blocks (#227) --- src/engine/thread.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/thread.js b/src/engine/thread.js index 3b17ab6190c..b0cb410b0f3 100644 --- a/src/engine/thread.js +++ b/src/engine/thread.js @@ -451,7 +451,8 @@ class Thread { let callCount = 5; // Max number of enclosing procedure calls to examine. const sp = this.stackFrames.length - 1; for (let i = sp - 1; i >= 0; i--) { - const block = this.target.blocks.getBlock(this.stackFrames[i].op.id); + const block = this.target.blocks.getBlock(this.stackFrames[i].op.id) || + this.target.runtime.flyoutBlocks.getBlock(this.stackFrames[i].op.id); if (block.opcode === 'procedures_call' && block.mutation.proccode === procedureCode) { return true;