aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4value_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-02-15 14:10:20 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2018-02-15 14:10:20 +0000
commit471f8421bc4d75adc8e4a357d525ade9ede20e29 (patch)
tree4c4e132b5c218433ed2619de9c6f53b914103fe0 /src/qml/jsruntime/qv4value_p.h
parent421dcfb5792a5ff5e5a9851e0c1edf6e87422680 (diff)
parent4d525de33e2ee55e69bb6c90fc11049a0f8b36b5 (diff)
Merge "Merge remote-tracking branch 'origin/5.10' into 5.11" into refs/staging/5.11
Diffstat (limited to 'src/qml/jsruntime/qv4value_p.h')
-rw-r--r--src/qml/jsruntime/qv4value_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index 843fbc1d91..b3f04d69be 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -57,6 +57,8 @@
#include "qv4global_p.h"
#include <private/qv4heap_p.h>
+#include <private/qnumeric_p.h>
+
QT_BEGIN_NAMESPACE
namespace QV4 {
@@ -322,6 +324,8 @@ public:
return d;
}
QML_NEARLY_ALWAYS_INLINE void setDouble(double d) {
+ if (qt_is_nan(d))
+ d = qt_qnan();
memcpy(&_val, &d, 8);
_val ^= NaNEncodeMask;
Q_ASSERT(isDouble());