Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an off-by-one error in interpreter's do_invoke #54443

Merged
merged 2 commits into from
May 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ static jl_value_t *do_invoke(jl_value_t **args, size_t nargs, interpreter_state
JL_GC_PUSHARGS(argv, nargs - 1);
size_t i;
for (i = 1; i < nargs; i++)
argv[i] = eval_value(args[i], s);
argv[i-1] = eval_value(args[i], s);
jl_method_instance_t *meth = (jl_method_instance_t*)args[0];
assert(jl_is_method_instance(meth));
jl_value_t *result = jl_invoke(argv[1], &argv[2], nargs - 2, meth);
jl_value_t *result = jl_invoke(argv[0], &argv[1], nargs - 2, meth);
fatteneder marked this conversation as resolved.
Show resolved Hide resolved
JL_GC_POP();
return result;
}
Expand Down