TurboWarp / scratch-vm

Scratch VM with a JIT compiler and more features
https://turbowarp.org/
Mozilla Public License 2.0
75 stars 72 forks source link

fix isRecursiveCall failing on flyout blocks #227

Closed FurryR closed 2 weeks ago

FurryR commented 2 weeks ago

Resolves

image

When in interpreter mode, clicking "b" in the flyout will cause exceptions:

Uncaught TypeError: Cannot read properties of undefined (reading 'opcode')
    at a.isRecursiveCall (thread.js:455:23)
    at c.stepToProcedure (sequencer.js:321:36)
    at Object.startProcedure (block-utility.js:154:24)
    at Object.call (scratch3_procedures.js:92:14)
    at push.e.exports (execute.js:531:40)
    at c.stepThread (sequencer.js:216:17)
    at c.stepThreads (sequencer.js:129:26)
    at c.stepThreads (module.js:385:32)
    at Y._step (runtime.js:2537:44)
    at Y._step (userscript.js:237:30)

Proposed Changes

Fixed the issue by adding flyoutBlocks as a fallback.

Reason for Changes

I don't know.

Test Coverage

N/A