8000 Merge pull request #5214 from dhalbert/usb-hid-device-args-fix · tannewt/circuitpython@da320c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit da320c3

Browse files
authored
Merge pull request micropython#5214 from dhalbert/usb-hid-device-args-fix
Fix incorrect subscription in `usb_hid.Device` constructor
2 parents 02bbb20 + 1685e1a commit da320c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared-bindings/usb_hid/Device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ STATIC mp_obj_t usb_hid_device_make_new(const mp_obj_type_t *type, size_t n_args
126126
1, 255, MP_QSTR_report_ids);
127127

128128
in_report_lengths_array[i] = (uint8_t)mp_arg_validate_int_range(
129-
MP_OBJ_SMALL_INT_VALUE(mp_obj_subscr(in_report_lengths_array, i_obj, MP_OBJ_SENTINEL)),
129+
MP_OBJ_SMALL_INT_VALUE(mp_obj_subscr(in_report_lengths, i_obj, MP_OBJ_SENTINEL)),
130130
0, 255, MP_QSTR_in_report_lengths);
131131

132132
out_report_lengths_array[i] = (uint8_t)mp_arg_validate_int_range(
133-
MP_OBJ_SMALL_INT_VALUE(mp_obj_subscr(out_report_lengths_array, i_obj, MP_OBJ_SENTINEL)),
133+
MP_OBJ_SMALL_INT_VALUE(mp_obj_subscr(out_report_lengths, i_obj, MP_OBJ_SENTINEL)),
134134
0, 255, MP_QSTR_out_report_lengths);
135135
}
136136

0 commit comments

Comments
 (0)
0