SFML community forums

Help => Network => Topic started by: Unarelith on July 06, 2020, 11:25:37 pm

Title: sf::Packet is probably not endianness-safe
Post by: Unarelith on July 06, 2020, 11:25:37 pm
Since there is no code handling it for floats and doubles, I think sf::Packet is not completely endianness-safe.
Also it doesn't seem to support non-IEC-559 floats and doubles, but it's even rarer.

Is it worth opening an issue?
I don't have a big-endian machine to test this on, unfortunately.

I think either the code or the doc needs to be changed accordingly if this is confirmed.
Either the doc by saying it's not safe for floats and doubles, or the code by actually handling it (but it might be hard to test considering big-endian machines are rare nowadays).