diff --git a/firmware/drivers/usb-designware.c b/firmware/drivers/usb-designware.c index beecb5ea7a..862445f2e8 100644 --- a/firmware/drivers/usb-designware.c +++ b/firmware/drivers/usb-designware.c @@ -896,7 +896,7 @@ static void usb_dw_control_received(struct usb_ctrlrequest* req) break; default: - panicf("%s: bad state=%s", __func__, dw_state_str[ep0.state]); + panicf("%s: bad state=%s", __func__, ep0.state >= EP0_NUM_STATES ? "unk" : dw_state_str[ep0.state]); } }