Skip to content

AVM1: Avm1Function's base_clip should be a string path #20861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

CUB3D
Copy link
Contributor

@CUB3D CUB3D commented Jun 29, 2025

The base_clip of an Avm1Function is also accessed with string path semantics.

This fixes both #6124 and #14562

let func = Avm1Function::from_swf_function(
self.gc(),
swf_version,
func_data,
action,
self.scope(),
constant_pool,
self.base_clip(),
// `base_clip` should always be a living `MovieClip` so this can't fail
MovieClipReference::try_from_stage_object(self, bc).unwrap(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open for an alternative to the unwrap, but I've manged to convince myself it's safe

@n0samu n0samu added A-avm1 Area: AVM1 (ActionScript 1 & 2) newsworthy T-fix Type: Bug fix (in something that's supposed to work already) labels Jun 29, 2025
@CUB3D CUB3D force-pushed the avm1_function_string_path branch from fa7c616 to a16a6f4 Compare July 20, 2025 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-avm1 Area: AVM1 (ActionScript 1 & 2) newsworthy T-fix Type: Bug fix (in something that's supposed to work already)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants