From 7c6506e028b6ddb65ee296397c4f20ebeeb2f56f Mon Sep 17 00:00:00 2001 From: Andrea Catania Date: Thu, 24 Dec 2020 18:03:50 +0100 Subject: Fixes: GDscript min and max are inverted --- core/variant/variant_utility.cpp | 4 ++-- 1 file 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(); -- cgit v1.2.3