Fix #1861 - MAX_EXCEPTION_NUM is the highest number, so check should be > not >= (#1866)

This commit is contained in:
will-v-pi 2024-08-24 20:54:06 +01:00 committed by GitHub
parent 7d5d9276a8
commit bc598fff27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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) { 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) { exception_handler_t exception_get_vtable_handler(enum exception_number num) {