mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
[net] Fix issue #5036 when write a double value into bytebuffer at big endian machine with unsafe mode. (#5076)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
2aa0d9a54d
commit
80d148b175
@@ -554,7 +554,7 @@ namespace FlatBuffers
|
||||
}
|
||||
else
|
||||
{
|
||||
*(ulong*)(ptr + offset) = ReverseBytes(*(ulong*)(ptr + offset));
|
||||
*(ulong*)(ptr + offset) = ReverseBytes(*(ulong*)(&value));
|
||||
}
|
||||
}
|
||||
#else // !UNSAFE_BYTEBUFFER
|
||||
|
||||
Reference in New Issue
Block a user