[net] Fix issue #5036 when write a double value into bytebuffer at big endian machine with unsafe mode. (#5076)

This commit is contained in:
Simon.S.King 2018-12-04 01:50:26 +08:00 committed by Wouter van Oortmerssen
parent 2aa0d9a54d
commit 80d148b175
1 changed files with 1 additions and 1 deletions

View File

@ -554,7 +554,7 @@ namespace FlatBuffers
}
else
{
*(ulong*)(ptr + offset) = ReverseBytes(*(ulong*)(ptr + offset));
*(ulong*)(ptr + offset) = ReverseBytes(*(ulong*)(&value));
}
}
#else // !UNSAFE_BYTEBUFFER