Commit 80d148b1 authored by Simon.S.King's avatar Simon.S.King Committed by Wouter van Oortmerssen

[net] Fix issue #5036 when write a double value into bytebuffer at big endian…

[net] Fix issue #5036 when write a double value into bytebuffer at big endian machine with unsafe mode. (#5076)
parent 2aa0d9a5
...@@ -554,7 +554,7 @@ namespace FlatBuffers ...@@ -554,7 +554,7 @@ namespace FlatBuffers
} }
else else
{ {
*(ulong*)(ptr + offset) = ReverseBytes(*(ulong*)(ptr + offset)); *(ulong*)(ptr + offset) = ReverseBytes(*(ulong*)(&value));
} }
} }
#else // !UNSAFE_BYTEBUFFER #else // !UNSAFE_BYTEBUFFER
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment