Fix: "" should not be equal to 0

fixes #9792
This commit is contained in:
Gunnar Beutner 2015-07-30 19:58:22 +02:00
parent 21e34c7f05
commit df6deb1b3e
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ bool Value::operator==(const Value& rhs) const
{
if (IsNumber() && rhs.IsNumber())
return Get<double>() == rhs.Get<double>();
else if ((IsBoolean() || IsNumber() || IsEmpty()) && (rhs.IsBoolean() || rhs.IsNumber() || rhs.IsEmpty()) && !(IsEmpty() && rhs.IsEmpty()))
else if ((IsBoolean() || IsNumber()) && (rhs.IsBoolean() || rhs.IsNumber()) && !(IsEmpty() && rhs.IsEmpty()))
return static_cast<double>(*this) == static_cast<double>(rhs);
if (IsString() && rhs.IsString())