aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2018-03-22 12:10:33 +0100
committerErik Verbruggen <erik.verbruggen@qt.io>2018-03-26 08:01:58 +0000
commit106631254f1c4d322d2347477725f6d0ed28faac (patch)
tree80dc3c385ce7a39c6cd94b967d054984efb1657f /src/qml
parent3d67ffa29191799014111accb9ff5d2f737f659c (diff)
Fix isInt32 for -0.0
Because no, that can't be represented as an 32bit integer. Change-Id: I83e5e74fdfbd9b13ac04a49311619d8939c7b093 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/jsruntime/qv4value_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index 97ed13cd91..a5ee6b5373 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -339,7 +339,7 @@ public:
if (isDouble()) {
double d = doubleValue();
int i = (int)d;
- if (i == d) {
+ if (i == d && !(d == 0 && std::signbit(d))) {
setInt_32(i);
return true;
}