Merge pull request #25518 from bojidar-bg/25505-wrong-type-error-message

Fix wrong error messages for invalid arguments when calling functions through call
This commit is contained in:
Rémi Verschelde 2019-02-08 11:18:30 +01:00 committed by GitHub
commit 7fcdadadf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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") {