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

Handle INVALID_FUNCTION mismatches at plugin boundaries, redux #2136

Conversation

adriansmares
Copy link
Contributor

@adriansmares adriansmares commented Apr 19, 2024

References #2071

This PR picks back from the closure of the original one. The commits have been cherry picked on top of the current HEAD and the special handling of pre-1.12-zero-function-IDs has been dropped completely, as zero function IDs were invalid before 1.12.

The INVALID_FUNCTION is stored as a zero in the data packs, and it is converted to the appropriate (-1/0) function ID on load.

There are some explicit checks for non-null-but-negative-or-zero function IDs which are extra compared to the original code and the original PR. These are added under the assumption that it's better to have an explicit error than propagating 'wrong' function IDs around. Do let me know if these should be removed or not.

@adriansmares adriansmares marked this pull request as ready for review April 19, 2024 22:28
Copy link
Member

@dvander dvander left a comment

Choose a reason for hiding this comment

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

thanks for doing this. lgtm

@psychonic psychonic merged commit af93d81 into alliedmodders:master Apr 20, 2024
4 checks passed
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.

None yet

4 participants