Skip to content

Commit e9fa762

Browse files
author
Daniel Campora
committed
cc3200: Correct WLAN constructor argument checking.
1 parent c0c07fb commit e9fa762

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cc3200/mods/modwlan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,12 +822,12 @@ STATIC bool wlan_scan_result_is_unique (const mp_obj_list_t *nets, _u8 *bssid) {
822822
/// Create a wlan object. See iwconfig for parameters of initialization.
823823
STATIC mp_obj_t wlan_make_new (mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
824824
// check arguments
825-
mp_arg_check_num(n_args, n_kw, 0, MP_ARRAY_SIZE(wlan_iwconfig_args), true);
825+
mp_arg_check_num(n_args, n_kw, 0, 0, true);
826826
wlan_obj.base.type = (mp_obj_type_t*)&mod_network_nic_type_wlan;
827827
if (n_kw > 0) {
828828
mp_map_t kw_args;
829829
mp_map_init_fixed_table(&kw_args, n_kw, args);
830-
wlan_iwconfig(1, (const mp_obj_t *)&wlan_obj, &kw_args);
830+
wlan_iwconfig(n_args + 1, (const mp_obj_t *)&wlan_obj, &kw_args);
831831
}
832832
return &wlan_obj;
833833
}

0 commit comments

Comments
 (0)