Skip to content

Commit

Permalink
extmod/network_cyw43: Fix setting hostname using config() method.
Browse files Browse the repository at this point in the history
This bug is probably a typo. args[0] is the cyw43 object itself.
While the value of a kwargs is in e->value.
  • Loading branch information
Oliver Joos authored and dpgeorge committed Apr 4, 2023
1 parent 3d46fe6 commit 11b5ee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extmod/network_cyw43.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ STATIC mp_obj_t network_cyw43_config(size_t n_args, const mp_obj_t *args, mp_map
case MP_QSTR_hostname: {
// TODO: Deprecated. Use network.hostname(name) instead.
size_t len;
const char *str = mp_obj_str_get_data(args[0], &len);
const char *str = mp_obj_str_get_data(e->value, &len);
if (len >= MICROPY_PY_NETWORK_HOSTNAME_MAX_LEN) {
mp_raise_ValueError(NULL);
}
Expand Down

0 comments on commit 11b5ee0

Please sign in to comment.