PuzzleScriptPlus icon indicating copy to clipboard operation
PuzzleScriptPlus copied to clipboard

If `again` and `win` are triggered together, the `win` is lost

Open david-pfx opened this issue 2 years ago • 1 comments

Here is the repro case. Press Right 3 times. On vanilla PS and P:S this triggers a win, but not on PS+.

test_ps_winbug.txt

The bug seems to be during again processing. I haven't nailed it yet.

david-pfx avatar Nov 06 '23 12:11 david-pfx

Finally nailed it!!! At engine.js:3324 the return is taken before changes to the level have been restored. So the combo of again, win and changes to the level will trigger the bug. The fix is to delete those 3 lines.😎

david-pfx avatar Nov 08 '23 00:11 david-pfx