summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2017-06-22 09:37:52 +0200
committerLars Knoll <lars.knoll@qt.io>2017-06-22 08:05:29 +0000
commitc173394036a59dbbe5af6912c4145e8c4b2b8271 (patch)
tree2f4eb30c8fedc7377f146928da0ef33fe6d261ba
parent1d7f082f3393f726b16e24bf85e2eb2f81b29771 (diff)
downloadqtdeclarative-c173394036a59dbbe5af6912c4145e8c4b2b8271.tar.gz
Fix another -0 check
Change-Id: I6146e4c41aa08ff4804fa2f37e93186ddc0a2a0f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/qml/jsruntime/qv4value.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp
index f41442df7a..d94d141c0b 100644
--- a/src/qml/jsruntime/qv4value.cpp
+++ b/src/qml/jsruntime/qv4value.cpp
@@ -236,9 +236,9 @@ bool Value::sameValue(Value other) const {
if (s && os)
return s->isEqualTo(os);
if (isInteger() && other.isDouble())
- return int_32() ? (double(int_32()) == other.doubleValue()) : (other._val == 0);
+ return int_32() ? (double(int_32()) == other.doubleValue()) : !std::signbit(other.doubleValue());
if (isDouble() && other.isInteger())
- return other.int_32() ? (doubleValue() == double(other.int_32())) : (_val == 0);
+ return other.int_32() ? (doubleValue() == double(other.int_32())) : !std::signbit(doubleValue());
return false;
}