Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First found when using rye-ebitengine. Under certain circumstances, this happens when a Rye program calls a native binding, which internally calls a Rye function as a callback. I'm still not 100% sure how the bug came to be, but here's my theory: Calls to CallFunctionArgsN are nested, meaning we need to build something like a "call stack" to keep track of the "program counter" (here ps.Ser.pos). It is the job of psX to act as the "inner stack frame". Previously, ps was used, which would just override the "outer stack frame's" program counter, causing it to set to position 0, i.e. re-running the program from the start.
- Loading branch information