Files
K. S. Ernest (iFire) Lee 65ca207d2c dds: Use put_u32 for unsigned integer puts.
UBSan reports:
  image_saver_dds.cpp:417: implicit conversion from type 'uint32_t'
  of value 4278190080 to type 'int32_t' changed the value to -16777216
  stream_peer.cpp:184: implicit conversion from type 'int32_t'
  of value -16777216 to type 'uint32_t' changed the value to 4278190080

The DDS pixel format masks (r/g/b/a_mask) are uint32_t but put_32
takes int32_t. Use put_u32 to avoid the round-trip conversion that
UBSan flags when the high bit is set (e.g. a_mask = 0xFF000000).

This fix found a large class of uses where we put unsigned integer values into
integer puts.
2026-04-12 12:04:56 -07:00
..