Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sf::Packet is probably not endianness-safe  (Read 3404 times)

0 Members and 1 Guest are viewing this topic.

Unarelith

  • Newbie
  • *
  • Posts: 8
    • View Profile
sf::Packet is probably not endianness-safe
« 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).

 

anything