Skip to content

Commit 697fba2

Browse files
committed
ShiftRegisterKeys key_count value was wrong
1 parent afc217a commit 697fba2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

shared-bindings/keypad/ShiftRegisterKeys.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ static mp_obj_t keypad_shiftregisterkeys_make_new(const mp_obj_type_t *type, siz
136136
size_t key_count_array[num_key_counts];
137137

138138
if (mp_obj_is_int(args[ARG_key_count].u_obj)) {
139-
const size_t key_count = (size_t)mp_arg_validate_int_min(args[ARG_key_count].u_int, 1, MP_QSTR_key_count);
139+
const size_t key_count =
140+
(size_t)mp_arg_validate_int_min(mp_obj_get_int(args[ARG_key_count].u_obj), 1, MP_QSTR_key_count);
140141
key_count_array[0] = key_count;
141142
} else {
142143
for (size_t kc = 0; kc < num_key_counts; kc++) {

0 commit comments

Comments
 (0)