diff options
author | Andrea Catania <info@andreacatania.com> | 2020-12-24 18:03:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-24 18:03:50 +0100 |
commit | 7c6506e028b6ddb65ee296397c4f20ebeeb2f56f (patch) | |
tree | f5bc63ce6ede10675baa9974f92a42c1dfedc1df /core/variant | |
parent | 187be733aac2cb368ee23254d199ff4c71162701 (diff) |
Fixes: GDscript min and max are inverted
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/variant_utility.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp index d54e223a99..ab82ed465a 100644 --- a/core/variant/variant_utility.cpp +++ b/core/variant/variant_utility.cpp @@ -291,7 +291,7 @@ struct VariantUtilityFunctions { Variant ret; for (int i = 1; i < p_argcount; i++) { bool valid; - Variant::evaluate(Variant::OP_GREATER, base, *p_args[i], ret, valid); + Variant::evaluate(Variant::OP_LESS, base, *p_args[i], ret, valid); if (!valid) { r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.expected = base.get_type(); @@ -324,7 +324,7 @@ struct VariantUtilityFunctions { Variant ret; for (int i = 1; i < p_argcount; i++) { bool valid; - Variant::evaluate(Variant::OP_LESS, base, *p_args[i], ret, valid); + Variant::evaluate(Variant::OP_GREATER, base, *p_args[i], ret, valid); if (!valid) { r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.expected = base.get_type(); |