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();