Fix isRecursiveCall failing on flyout blocks (#227)

This commit is contained in:
凌 authored and GitHub committed 2024-09-30 22:47:02 -05:00
1 parent 179030ad49
commit fed099c4cc
1 file changed
+2 -1
+2 -1
View File
@@ -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;