issue adafruit#6538 loose bounds checking on WAIT PIO instruction
This commit is contained in:
parent
c1b00442a1
commit
dce9396fe3
@ -436,7 +436,7 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self,
|
||||
if (first_in_pin == NULL) {
|
||||
mp_raise_ValueError_varg(translate("Missing first_in_pin. Instruction %d waits based on pin"), i);
|
||||
}
|
||||
if (wait_index > in_pin_count) {
|
||||
if (wait_index >= in_pin_count) {
|
||||
mp_raise_ValueError_varg(translate("Instruction %d waits on input outside of count"), i);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user