lsalzman / enet

ENet reliable UDP networking library
MIT License
2.72k stars 670 forks source link

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

Closed arvid-norlander closed 7 months ago

arvid-norlander commented 7 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.