avm2: Parity with SWFv9 and SWFv10 for invalid gotoAndStop parameters - #24741
Merged
Merged
Conversation
Lord-McSweeney
self-requested a review
September 21, 2026 01:09
lsaa
force-pushed
the
fix/invalid-goto-handling
branch
from
September 21, 2026 08:43
d6a8687 to
7bd0522
Compare
4 of 5 tasks
Member
|
This should fix #24501 |
lsaa
force-pushed
the
fix/invalid-goto-handling
branch
from
October 1, 2026 03:19
7bd0522 to
16f1a39
Compare
Contributor
Author
Confirmed |
lsaa
force-pushed
the
fix/invalid-goto-handling
branch
2 times, most recently
from
October 1, 2026 04:36
c8e69c9 to
09fbdb1
Compare
Contributor
Author
|
Two of the tests from #24816 pass now so I removed known_failure from them. The holdout is the swf9 one but fixing it isn't in the scope of this PR. |
Makes invalid avm2 MovieClip goto NOOP inside frame scripts on SWFv9 and SWFv10 instead of setting them to frame 1.
Also some progress on the swf9 test
Lord-McSweeney
force-pushed
the
fix/invalid-goto-handling
branch
from
October 1, 2026 15:34
09fbdb1 to
2d205a9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
SWFv9 and SWFv10 NOOP when given invalid gotos inside frame scripts. This doesn't affect v11+ since those crash earlier if given invalid values. This only touches frame scripts, outside of those it should still set invalid frames to frame 1.
Testing
Added an unit test (d6a8687) for this that fails if it doesn't NOOP the goto expression.
In Super Crazy Guitar Maniac Deluxe 2 you'd always get a bronze medal sprite no matter your score since it's the first frame and the game sends an undefined goto. Game displays it properly on all official Flash players I tested.
Checklist