mirror of
https://github.com/nlohmann/json.git
synced 2026-04-02 22:28:53 +00:00
Do proper endian conversions
This fixes all testsuite failures on big endian hosts.
This commit is contained in:
@@ -1853,7 +1853,7 @@ class binary_reader
|
||||
}
|
||||
|
||||
// reverse byte order prior to conversion if necessary
|
||||
if (is_little_endian && !InputIsLittleEndian)
|
||||
if (is_little_endian != InputIsLittleEndian)
|
||||
{
|
||||
vec[sizeof(NumberType) - i - 1] = static_cast<uint8_t>(current);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user