fix for some architectures (fixes #608)

This commit is contained in:
John
2022-05-29 15:25:01 +02:00
parent 458c8dfbc7
commit fce1088cc3
+2 -2
View File
@@ -43,7 +43,7 @@ using std::setw;
using std::endl;
float uintToFloat(unsigned int value) {
float uintToFloat(unsigned int value, bool negative) {
#ifdef HAVE_DIRECT_FLOAT_FORMAT
# if HAVE_DIRECT_FLOAT_FORMAT == 2
value = __builtin_bswap32(value);
@@ -826,7 +826,7 @@ result_t NumberDataType::readFromRawValue(unsigned int value,
}
if (m_bitCount == 32) {
if (hasFlag(EXP)) { // IEEE 754 binary32
float val = uintToFloat(value);
float val = uintToFloat(value, negative);
if (val != val) { // !isnan(val)
if (outputFormat & OF_JSON) {
*output << "null";