Files
Jungfraujoch/frame_serialize
leonarski_fandClaude Opus 4.8 bee35f7a25 frame_serialize: write CBOR length big-endian without bswap intrinsic
AppendImage wrote the CBOR byte-string length (major type 2, 8-byte length,
which is defined big-endian) via __builtin_bswap64 under #ifdef LITTLE_ENDIAN.
That is broken two ways off GCC/Clang+glibc: __builtin_bswap64 is not available
on MSVC, and LITTLE_ENDIAN is not defined there, so the #else path skipped the
swap and emitted a little-endian length on a little-endian host -> corrupt
frames.

Write the 8 length bytes most-significant-first directly. This is big-endian by
construction on any host, needs no byte-swap intrinsic and no endianness macro,
and is byte-for-byte identical to the previous output on little-endian hosts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 15:02:39 +02:00
..
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2025-05-28 18:49:27 +02:00