Commit 5ba58f4a authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

objgenerator: Fix check for too few args passed to gen function.

parent c3103b55
......@@ -194,8 +194,12 @@ bool mp_obj_fun_prepare_simple_args(mp_obj_t self_in, uint n_args, uint n_kw, co
if (n_args > self->n_pos_args) {
goto arg_error;
} else {
extra_args -= self->n_pos_args - n_args;
n_extra_args += self->n_pos_args - n_args;
if (n_args >= self->n_pos_args - self->n_def_args) {
extra_args -= self->n_pos_args - n_args;
n_extra_args += self->n_pos_args - n_args;
} else {
fun_pos_args_mismatch(self, self->n_pos_args - self->n_def_args, n_args);
}
}
*out_args1 = args;
*out_args1_len = n_args;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment