pond3r / ggpo

Good Game, Peace Out Rollback Network SDK
MIT License
3.12k stars 361 forks source link

Return correct value in UdpMsg::PayloadSize for SyncRequest type packets #27

Closed mrjnumber1 closed 4 years ago

mrjnumber1 commented 4 years ago

I believe this to be in error, as it would be requesting the size of the SyncReply's union. I don't know if this has actual issues, aside from telling the user to make room for a few extra bytes on udp SendTo callback. Nonetheless, it is incorrectly written.

It looks like another case of the Last Line Effect (as noted in https://www.viva64.com/en/b/0260/)

pond3r commented 4 years ago

Yup! Good catch!