From d543ddf1c9e0aaa3766ceeeb9bb704399d4795dd Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Tue, 6 Dec 2022 21:48:58 -0600 Subject: [PATCH] Fix Variant StringName `is_zero` being inverted --- core/variant/variant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/variant/variant.cpp b/core/variant/variant.cpp index c1166a0a14b..8be1cda37c9 100644 --- a/core/variant/variant.cpp +++ b/core/variant/variant.cpp @@ -940,7 +940,7 @@ bool Variant::is_zero() const { return reinterpret_cast(_data._mem)->is_null(); } case STRING_NAME: { - return *reinterpret_cast(_data._mem) != StringName(); + return *reinterpret_cast(_data._mem) == StringName(); } case NODE_PATH: { return reinterpret_cast(_data._mem)->is_empty();