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 invalid return value when calling injected methods via Il2Cpp reflection #74

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

limoka
Copy link
Contributor

@limoka limoka commented Feb 13, 2023

This PR fixes an issue where calling injected methods via Il2Cpp reflection resulted in garbage data for value types and null for reference types returned.
This issue is caused by change in signature of invoker_method in Il2Cpp version 29

@limoka
Copy link
Contributor Author

limoka commented Feb 13, 2023

So far I have tested value type and reference types being passed correctly. Not sure about byref ones though. Also probably a test on 27 version of il2cpp would good.

Copy link
Member

@Kasuromi Kasuromi left a comment

Choose a reason for hiding this comment

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

Behavior remains the same for pre-v29 game versions.
Tested on v24 & two v27 games.

@Kasuromi Kasuromi merged commit e28b791 into BepInEx:master Feb 14, 2023
@limoka limoka deleted the fix-reflection-return-value branch February 14, 2023 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants