summaryrefslogtreecommitdiff
path: root/py/objtype.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objtype.c')
-rw-r--r--py/objtype.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/objtype.c b/py/objtype.c
index 5133d849f..7d41b8656 100644
--- a/py/objtype.c
+++ b/py/objtype.c
@@ -850,7 +850,8 @@ STATIC mp_obj_t instance_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value
meth_args = 3;
}
if (member[0] == MP_OBJ_SENTINEL) {
- return mp_obj_subscr(self->subobj[0], index, value);
+ mp_obj_t args[3] = {MP_OBJ_SENTINEL, self_in, self->subobj[0]};
+ return mp_obj_subscr(args, index, value);
} else if (member[0] != MP_OBJ_NULL) {
mp_obj_t args[3] = {self_in, index, value};
// TODO probably need to call mp_convert_member_lookup, and use mp_call_method_n_kw