mirror of https://github.com/arendst/Tasmota.git
Berry C mapping, raise an error if too many arguments are sent (#20604)
This commit is contained in:
parent
57e633ba55
commit
19b9960168
|
@ -19,6 +19,7 @@ All notable changes to this project will be documented in this file.
|
|||
- Utouch optimizations, rgb i2c init (#20596)
|
||||
|
||||
### Fixed
|
||||
- Berry C mapping, raise an error if too many arguments are sent
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
@ -360,6 +360,9 @@ int be_check_arg_type(bvm *vm, int arg_start, int argc, const char * arg_type, i
|
|||
}
|
||||
}
|
||||
// berry_log_C(">> be_call_c_func arg %i, type %s", i, arg_type_check ? type_short_name : "<null>");
|
||||
if (arg_type_check && type_short_name[0] == 0) {
|
||||
be_raisef(vm, "value_error", "Too many arguments");
|
||||
}
|
||||
p[p_idx] = be_convert_single_elt(vm, i + arg_start, arg_type_check ? type_short_name : NULL, (int*)&buf_len);
|
||||
// berry_log_C("< ret[%i]=%i", p_idx, p[p_idx]);
|
||||
p_idx++;
|
||||
|
|
Loading…
Reference in New Issue