From bc598fff27d268090dabf12a9e93919b369a82bb Mon Sep 17 00:00:00 2001 From: will-v-pi <108662275+will-v-pi@users.noreply.github.com> Date: Sat, 24 Aug 2024 20:54:06 +0100 Subject: [PATCH] Fix #1861 - MAX_EXCEPTION_NUM is the highest number, so check should be > not >= (#1866) --- src/rp2_common/hardware_exception/exception.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rp2_common/hardware_exception/exception.c b/src/rp2_common/hardware_exception/exception.c index 2c318e462..d3134fbc8 100644 --- a/src/rp2_common/hardware_exception/exception.c +++ b/src/rp2_common/hardware_exception/exception.c @@ -39,7 +39,7 @@ static void set_raw_exception_handler_and_restore_interrupts(enum exception_numb } static inline void check_exception_param(__unused enum exception_number num) { - invalid_params_if(HARDWARE_EXCEPTION, num < MIN_EXCEPTION_NUM || num >= MAX_EXCEPTION_NUM); + invalid_params_if(HARDWARE_EXCEPTION, num < MIN_EXCEPTION_NUM || num > MAX_EXCEPTION_NUM); } exception_handler_t exception_get_vtable_handler(enum exception_number num) {