Fix Variant StringName is_zero being inverted

This commit is contained in:
Aaron Franke 2022-12-06 21:48:58 -06:00
parent c241f1c523
commit d543ddf1c9
No known key found for this signature in database
GPG Key ID: 40A1750B977E56BF

View File

@ -940,7 +940,7 @@ bool Variant::is_zero() const {
return reinterpret_cast<const Signal *>(_data._mem)->is_null();
}
case STRING_NAME: {
return *reinterpret_cast<const StringName *>(_data._mem) != StringName();
return *reinterpret_cast<const StringName *>(_data._mem) == StringName();
}
case NODE_PATH: {
return reinterpret_cast<const NodePath *>(_data._mem)->is_empty();