lsalzman / enet

ENet reliable UDP networking library
MIT License
2.77k stars 673 forks source link

Fix unaligned reads and writes of the checksum (fixes #237) #238

Closed arvid-norlander closed 8 months ago

arvid-norlander commented 8 months ago

This fixes #237 (unaligned reads and writes of checksum).

See the issue for more details on the problem. The fix is simple, use memcpy instead of assignment, which is safe even if unaligned.