diff options
author | Damien George <damien.p.george@gmail.com> | 2016-04-21 16:51:36 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-04-21 16:51:36 +0100 |
commit | fea40ad46815cb372312f8ae223efcb3b879dd0f (patch) | |
tree | 792d778536613667618b9544bc645215391e082d /py/bc.c | |
parent | d4f4cb6a240a96391cc8b8e61b0726c5084099fb (diff) | |
download | micropython-fea40ad46815cb372312f8ae223efcb3b879dd0f.tar.gz micropython-fea40ad46815cb372312f8ae223efcb3b879dd0f.zip |
py: Fix bug passing a string as a keyword arg in a dict.
Addresses issue #1998.
Diffstat (limited to 'py/bc.c')
-rw-r--r-- | py/bc.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -171,6 +171,7 @@ void mp_setup_code_state(mp_code_state *code_state, mp_obj_fun_bc_t *self, size_ const mp_obj_t *arg_names = (const mp_obj_t*)code_state->const_table; for (size_t i = 0; i < n_kw; i++) { + // the keys in kwargs are expected to be qstr objects mp_obj_t wanted_arg_name = kwargs[2 * i]; for (size_t j = 0; j < n_pos_args + n_kwonly_args; j++) { if (wanted_arg_name == arg_names[j]) { |