summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorAndrea Catania <info@andreacatania.com>2020-12-24 18:03:50 +0100
committerGitHub <noreply@github.com>2020-12-24 18:03:50 +0100
commit7c6506e028b6ddb65ee296397c4f20ebeeb2f56f (patch)
treef5bc63ce6ede10675baa9974f92a42c1dfedc1df /core
parent187be733aac2cb368ee23254d199ff4c71162701 (diff)
Fixes: GDscript min and max are inverted
Diffstat (limited to 'core')
-rw-r--r--core/variant/variant_utility.cpp4
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();