From: Gunnar Beutner Date: Thu, 30 Jul 2015 17:58:22 +0000 (+0200) Subject: Fix: "" should not be equal to 0 X-Git-Tag: v2.4.0~462 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df6deb1b3e53a9f77e3a8e66e23f96a6a65e0a01;p=icinga2 Fix: "" should not be equal to 0 fixes #9792 --- diff --git a/lib/base/value-operators.cpp b/lib/base/value-operators.cpp index 477076537..7c25188c7 100644 --- a/lib/base/value-operators.cpp +++ b/lib/base/value-operators.cpp @@ -159,7 +159,7 @@ bool Value::operator==(const Value& rhs) const { if (IsNumber() && rhs.IsNumber()) return Get() == rhs.Get(); - 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(*this) == static_cast(rhs); if (IsString() && rhs.IsString())