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

fix: commodore class remap on latest spigot versions #1535

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

derklaro
Copy link
Member

Motivation

Spigot made a change to Commodore a few days ago (merged into paper yesterday) that made the Commodore#convert non-static. Therefore our current transformer for the class fails as it tries to return the slot 0 (which, when the method is static, is the first argument) which now is the Commodore instance.

Modification

Check if the method being transformed is static and return slot 0 in that case, if the method is not static return slot 1. In both constellations the first argument of the convert method, the raw input class bytes, is returned.

Result

Latest Spigot/Paper Services no longer crash due to a bad stack frame.

@derklaro derklaro added v: 4.X This pull should be included in the 4.0 release t: fix A pull request introducing a fix for a bug. in: wrapper An issue/pull request releated to the wrapper module code labels Oct 21, 2024
@derklaro derklaro added this to the 4.0.0-RC11.1 milestone Oct 21, 2024
@derklaro derklaro requested a review from 0utplay October 21, 2024 15:00
@derklaro derklaro self-assigned this Oct 21, 2024
@derklaro derklaro merged commit 8652ceb into nightly Oct 21, 2024
8 checks passed
@derklaro derklaro deleted the fix-commodore-remap branch October 21, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: wrapper An issue/pull request releated to the wrapper module code t: fix A pull request introducing a fix for a bug. v: 4.X This pull should be included in the 4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants