Skip to content

Commit

Permalink
Fix isRecursiveCall failing on flyout blocks (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
FurryR authored Oct 1, 2024
1 parent 179030a commit fed099c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/engine/thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fed099c

Please sign in to comment.