summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-01-05 13:42:08 +0100
committerGitHub <noreply@github.com>2021-01-05 13:42:08 +0100
commiteea3287c2df09a9d1396bd2d63d48c90b091d973 (patch)
tree7e045f02d9ee871954aa187c2e2ac0dfa4a5b14b /core
parent20b3ed07b92fa73a7e7d7a23ad57e3473c54f961 (diff)
parent7c6506e028b6ddb65ee296397c4f20ebeeb2f56f (diff)
Merge pull request #44661 from AndreaCatania/AndreaCatania-patch-5
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 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();