Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2021-12-31 00:00:00Z and 2022-01-01 00:00:00Z
Avatar
14 Sadge
Avatar
  • Fix undefined behavior in uint_to_bytes_be and bytes_be_to_uint due to intermittent usage of int.
    • Fix the same issue in pnglite.
  • Add separate int_to_bytes_be and bytes_be_to_int to fix conversions between signed and unsigned and fix undefined/implementation-specific behavior due to right shift of negative number, by instead copying the bytes without using any bit arithmetic.
  • Add tests for all four byte packing functions.
Avatar
Avatar
Stiopa
solution: don't expand the codebase. 😉
imo it is good to minimize code changes to the necessary, because they invariably come with bugs, especially additions. A good PR adds little code imo :)
Avatar
you are right 😄 but I do like some additions too... speaking of which. still waiting for oy to notice my draft PR 😔
Exported 4 message(s)