Fix === operator
authorLars Knoll <lars.knoll@digia.com>
Thu, 1 Nov 2012 15:46:54 +0000 (16:46 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Thu, 1 Nov 2012 16:04:19 +0000 (17:04 +0100)
Correctly handle the case where one of the two
arguments is a double and the other an integer.

Change-Id: I589ac46acc30180b025c7e377c0523cf0889f294
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qmljs_runtime.h

index 6b31884..1220118 100644 (file)
@@ -1115,6 +1115,8 @@ inline uint __qmljs_cmp_in(Value left, Value right, Context *ctx)
 
 inline Bool __qmljs_strict_equal(Value x, Value y)
 {
+    if (x.isDouble() || y.isDouble())
+        return x.asDouble() == y.asDouble();
     if (x.rawValue() == y.rawValue())
         return true;
     if (x.isString() && y.isString())