From 955bcee1b3feddece875b1e891ecf6873d950154 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 23 Jul 2022 20:01:31 -0500 Subject: [PATCH] It's OK for an init program to be zero bytes long Closes #6636 --- ports/raspberrypi/bindings/rp2pio/StateMachine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.c b/ports/raspberrypi/bindings/rp2pio/StateMachine.c index 1203f4abac..f8ced08177 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.c +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.c @@ -247,7 +247,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n mp_raise_ValueError(translate("Program size invalid")); } - mp_arg_validate_length_range(init_bufinfo.len, 2, 64, MP_QSTR_init); + mp_arg_validate_length_range(init_bufinfo.len, 0, 64, MP_QSTR_init); if (init_bufinfo.len % 2 != 0) { mp_raise_ValueError(translate("Init program size invalid")); }