diff options
author | Simon.S.King <simonking200@163.com> | 2018-12-04 01:50:26 +0800 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2018-12-03 09:50:26 -0800 |
commit | 80d148b1757f0fab9305616d69d876378405843a (patch) | |
tree | 308f5d62f8bbf9bca68c8b77c377b611e996f92f /net | |
parent | 2aa0d9a54d9f45e2622e8f49f5c3a1b0c356c0a3 (diff) | |
download | flatbuffers-80d148b1757f0fab9305616d69d876378405843a.tar.gz flatbuffers-80d148b1757f0fab9305616d69d876378405843a.tar.bz2 flatbuffers-80d148b1757f0fab9305616d69d876378405843a.zip |
[net] Fix issue #5036 when write a double value into bytebuffer at big endian machine with unsafe mode. (#5076)
Diffstat (limited to 'net')
-rw-r--r-- | net/FlatBuffers/ByteBuffer.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/FlatBuffers/ByteBuffer.cs b/net/FlatBuffers/ByteBuffer.cs index 277fc1f8..1b2e1afe 100644 --- a/net/FlatBuffers/ByteBuffer.cs +++ b/net/FlatBuffers/ByteBuffer.cs @@ -554,7 +554,7 @@ namespace FlatBuffers } else { - *(ulong*)(ptr + offset) = ReverseBytes(*(ulong*)(ptr + offset)); + *(ulong*)(ptr + offset) = ReverseBytes(*(ulong*)(&value)); } } #else // !UNSAFE_BYTEBUFFER |