The output size is stored as `size_t`, a 64-bit value. However, on a big-endian system this would be truncated to 0 since the low memory addresses wold be sent. To fix this, we cast the `size_t` to `uint32_t` and send that. Note that calling `htonl()` would also work, but casting is simpler and does not require including platform-specific header files. Note that the tests now run, but there are 59 unexpected failures. Closes https://github.com/protocolbuffers/upb/issues/446pull/13171/head
parent
0cb7f72c02
commit
053567fd32
1 changed files with 2 additions and 1 deletions
Loading…
Reference in new issue