diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2019-01-31 17:02:18 +0200 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2019-01-31 17:02:18 +0200 |
commit | d2e43475b5c33d2240cefc09aaf7ee5061c1f1b2 (patch) | |
tree | 89fa2d6b78847e61eb41f1ea0cde0ce3449075c2 | |
parent | 35bb52011a4cbcd8ca3779ab1761244f06a33127 (diff) |
Fix wrong error messages for invalid arguments when calling functions through call
Fixes #25505
-rw-r--r-- | modules/gdscript/gdscript_function.cpp | 2 |
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") { |