futile / enet-rs

High-level bindings for the ENet networking library (http://enet.bespin.org)
Other
39 stars 21 forks source link

Fix endianness when creating address from Enet #10

Closed LeonMatthes closed 2 years ago

LeonMatthes commented 4 years ago

The from_enet_address function actually returned the wrong byte order on little endian machines (like x86).

This is now fixed, Ipv4Addr and Enet already use the same network byte order (big endian). So just never change it when converting.

bowbahdoe commented 3 years ago

Updates on this?

futile commented 2 years ago

Hi! Sorry for the long absence/late reply.

Thanks for fixing the issue, the fix looks good! If you can add a test and rebase (and run cargo fmt/cargo clippy) I think this is ready to be merged. Thanks again!

Edit: Since you updated the version number (which is fine), can you also update the version number in the "Usage" section in README.md? Thanks!

futile commented 2 years ago

I just fixed the small issues I had and merged it in #17, thanks again for the patch!