Commit fd2ba0bc authored by Philipp A. Hartmann's avatar Philipp A. Hartmann

GenericValue: fix comparison of (Ui|I)nt64 numbers


Some 64-bit integers cannot be represented losslessly as a double.
Due to a typo in the operator==, the comparison has been performed
after a double conversion in too many cases.
parent 47c32eee
......@@ -662,7 +662,7 @@ public:
return StringEqual(rhs);
case kNumberType:
if (IsDouble() || rhs.GetDouble())
if (IsDouble() || rhs.IsDouble())
return GetDouble() == rhs.GetDouble(); // May convert one operand from integer to double.
else
return data_.n.u64 == rhs.data_.n.u64;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment