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.
This commit is contained in:
parent
47c32eee6b
commit
fd2ba0bc44
@ -662,7 +662,7 @@ public:
|
|||||||
return StringEqual(rhs);
|
return StringEqual(rhs);
|
||||||
|
|
||||||
case kNumberType:
|
case kNumberType:
|
||||||
if (IsDouble() || rhs.GetDouble())
|
if (IsDouble() || rhs.IsDouble())
|
||||||
return GetDouble() == rhs.GetDouble(); // May convert one operand from integer to double.
|
return GetDouble() == rhs.GetDouble(); // May convert one operand from integer to double.
|
||||||
else
|
else
|
||||||
return data_.n.u64 == rhs.data_.n.u64;
|
return data_.n.u64 == rhs.data_.n.u64;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user