aboutsummaryrefslogtreecommitdiff
path: root/core/variant_op.cpp
diff options
context:
space:
mode:
authorMrCdK2018-01-06 03:58:04 +0100
committerMrCdK2018-01-06 04:19:48 +0100
commitb2617e72e5d76f8e35607b46d1c7b184df95e8cd (patch)
tree30c3bc2395852b9f36e7435bb46d1b3ff1b7bb26 /core/variant_op.cpp
parent8e8240450edc48f4fb379e593a4ef7f54ab656b7 (diff)
downloadgodot-b2617e72e5d76f8e35607b46d1c7b184df95e8cd.tar.gz
godot-b2617e72e5d76f8e35607b46d1c7b184df95e8cd.tar.zst
godot-b2617e72e5d76f8e35607b46d1c7b184df95e8cd.zip
Diffstat (limited to 'core/variant_op.cpp')
-rw-r--r--core/variant_op.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index 662371b10..e46fac77e 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -339,7 +339,7 @@ bool Variant::booleanize() const {
CASE_TYPE(m_prefix, m_op_name, m_name) { \
if (p_b.type == NIL) \
_RETURN(true) \
- DEFAULT_OP_ARRAY_OP_BODY(m_prefix, m_op_name, m_name, m_type, !=, ==, true, true, false) \
+ DEFAULT_OP_ARRAY_OP_BODY(m_prefix, m_op_name, m_name, m_type, !=, !=, false, true, true) \
}
#define DEFAULT_OP_ARRAY_LT(m_prefix, m_op_name, m_name, m_type) \
@@ -539,12 +539,12 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
if (arr_b->size() != l)
_RETURN(true);
for (int i = 0; i < l; i++) {
- if (((*arr_a)[i] == (*arr_b)[i])) {
- _RETURN(false);
+ if (((*arr_a)[i] != (*arr_b)[i])) {
+ _RETURN(true);
}
}
- _RETURN(true);
+ _RETURN(false);
}
DEFAULT_OP_NUM_NULL(math, OP_NOT_EQUAL, INT, !=, _int);