diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-01-05 13:42:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 13:42:08 +0100 |
commit | eea3287c2df09a9d1396bd2d63d48c90b091d973 (patch) | |
tree | 7e045f02d9ee871954aa187c2e2ac0dfa4a5b14b | |
parent | 20b3ed07b92fa73a7e7d7a23ad57e3473c54f961 (diff) | |
parent | 7c6506e028b6ddb65ee296397c4f20ebeeb2f56f (diff) |
Merge pull request #44661 from AndreaCatania/AndreaCatania-patch-5
Fixes: GDscript min and max are inverted
-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 caa0bfdbb1..f154ab1ed6 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(); |