summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2019-01-31 17:02:18 +0200
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2019-01-31 17:02:18 +0200
commitd2e43475b5c33d2240cefc09aaf7ee5061c1f1b2 (patch)
tree89fa2d6b78847e61eb41f1ea0cde0ce3449075c2
parent35bb52011a4cbcd8ca3779ab1761244f06a33127 (diff)
Fix wrong error messages for invalid arguments when calling functions through call
Fixes #25505
-rw-r--r--modules/gdscript/gdscript_function.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
index 966c02d4ec..98871ddec3 100644
--- a/modules/gdscript/gdscript_function.cpp
+++ b/modules/gdscript/gdscript_function.cpp
@@ -1083,7 +1083,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
if (argc >= 1) {
methodstr = String(*argptrs[0]) + " (via call)";
if (err.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) {
- err.argument -= 1;
+ err.argument += 1;
}
}
} else if (methodstr == "free") {