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

Match the layout of ENetAddress in enet.h #17

Merged
merged 1 commit into from
Sep 13, 2018

Conversation

joshpeterson
Copy link
Contributor

The managed ENetAddress structure did not match the layout of the native
ENetAddress structure defined in enet.h.

The native structure has an additional field, so add that same field to
the corresponding managed structure.

Without this field in the managed structure, p/invoke calls into the
native code will marshal it with some arbitrary value in the native side
of the field, which can lead to unexpected problems. This happens with
Unity's IL2CPP, for example.

Fixes #13

The managed `ENetAddress` structure did not match the layout of the native
`ENetAddress` structure defined in enet.h.

The native structure has an additional field, so add that same field to
the corresponding managed structure.

Without this field in the managed structure, p/invoke calls into the
native code will marshal it with some arbitrary value in the native side
of the field, which can lead to unexpected problems. This happens with
Unity's IL2CPP, for example.

Fixes #13
@nxrighthere nxrighthere merged commit 4c2ff4d into nxrighthere:master Sep 13, 2018
@nxrighthere
Copy link
Owner

Thank you Josh, merged. I missed this one...

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