diff options
| author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2025-10-12 23:00:20 +0300 |
|---|---|---|
| committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2025-10-12 23:00:20 +0300 |
| commit | 4826f86e274f1b29bd769e6790824f9e62a40f62 (patch) | |
| tree | c2cc4bb09ca91951a2641e33c3b0a65deb0af877 /src/qml/common/qv4staticvalue_p.h | |
| parent | 0f0972d542d9869c2dcfaf9c963d42ff32766460 (diff) | |
| parent | 844f9b9b376838bcb44324984876f8bf99d85d38 (diff) | |
Merge tag 'v6.5.7-lts-lgpl' into 6.56.5
Qt 6.5.7-lts-lgpl release
Diffstat (limited to 'src/qml/common/qv4staticvalue_p.h')
| -rw-r--r-- | src/qml/common/qv4staticvalue_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/common/qv4staticvalue_p.h b/src/qml/common/qv4staticvalue_p.h index e9c3554104..5c50df30c6 100644 --- a/src/qml/common/qv4staticvalue_p.h +++ b/src/qml/common/qv4staticvalue_p.h @@ -366,10 +366,10 @@ struct StaticValue QV4_NEARLY_ALWAYS_INLINE void setDouble(double d) { if (qt_is_nan(d)) { // We cannot store just any NaN. It has to be a NaN with only the quiet bit - // set in the upper bits of the mantissa and the sign bit off. + // set in the upper bits of the mantissa and the sign bit either on or off. // qt_qnan() happens to produce such a thing via std::numeric_limits, // but this is actually not guaranteed. Therefore, we make our own. - _val = (quint64(QuickType::NaN) << Tag_Shift); + _val = (quint64(std::signbit(d) ? QuickType::MinusNaN : QuickType::NaN) << Tag_Shift); Q_ASSERT(isNaN()); } else { memcpy(&_val, &d, 8); |
