[net] Fix issue #5036 when write a double value into bytebuffer at big endian machine with unsafe mode. (#5076)
This commit is contained in:
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
|
||||
|
|
Loading…
Reference in New Issue