Skip to content
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

avm2: Fix URShift in optimizer and hasnext in interpreter when passed a negative index #19219

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

Lord-McSweeney
Copy link
Collaborator

op_has_next should push false, not 0 when cur_index is negative, and Op::URShift should push the uint type in the optimizer, not the int type.

@torokati44 torokati44 added A-avm2 Area: AVM2 (ActionScript 3) T-fix Type: Bug fix (in something that's supposed to work already) labels Jan 14, 2025
Copy link
Collaborator

@adrian17 adrian17 left a comment

Choose a reason for hiding this comment

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

Approved, assuming this gets merged with the haxnext change removed or changed to int.

core/src/avm2/optimize.rs Outdated Show resolved Hide resolved
@Lord-McSweeney Lord-McSweeney force-pushed the avm2-fix-urshift branch 2 times, most recently from 0b1bf17 to 1fd0827 Compare January 15, 2025 18:43
`op_has_next` should push `false`, not `0` when `cur_index` is negative, and Op::URShift should push the uint type in the optimizer, not the int type.
@Lord-McSweeney Lord-McSweeney enabled auto-merge (rebase) January 15, 2025 18:49
@Lord-McSweeney Lord-McSweeney merged commit abdc9d5 into ruffle-rs:master Jan 15, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-avm2 Area: AVM2 (ActionScript 3) 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.

3 participants