Endianness problem of reading/writing data with pointer conversion #563
QuarterYang
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It seems pointer conversion like
*(uint*)is widely used to read/write data. The result might be influenced by endianness of the running machine per my understanding, thus the value read/written might be incorrect on big-endian machine. Am I misunderstanding something? Is it a better choise using methods like WriteUInt32LittleEndian/ReadUInt32LittleEndian in BinaryPrimitives?Beta Was this translation helpful? Give feedback.
All reactions