diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-06-22 09:37:52 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-06-22 08:05:29 +0000 |
commit | c173394036a59dbbe5af6912c4145e8c4b2b8271 (patch) | |
tree | 2f4eb30c8fedc7377f146928da0ef33fe6d261ba | |
parent | 1d7f082f3393f726b16e24bf85e2eb2f81b29771 (diff) | |
download | qtdeclarative-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.cpp | 4 |
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; } |