Do proper endian conversions

This fixes all testsuite failures on big endian hosts.
This commit is contained in:
Andreas Schwab
2019-02-25 12:09:13 +01:00
parent e326df211b
commit bb22b1003f
4 changed files with 6 additions and 7 deletions
@@ -1278,7 +1278,7 @@ class binary_writer
std::memcpy(vec.data(), &n, sizeof(NumberType));
// step 2: write array to output (with possible reordering)
if (is_little_endian and not OutputIsLittleEndian)
if (is_little_endian != OutputIsLittleEndian)
{
// reverse byte order prior to conversion if necessary
std::reverse(vec.begin(), vec.end());