逻辑错误

This commit is contained in:
codlearner 2023-04-12 10:58:30 +08:00 committed by supperthomas
parent 5bbcb5dc79
commit 590e603997
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
{
rt_isr_handler_t old_handler = RT_NULL;
if (vector < MAX_HANDLERS || vector >= 0)
if (vector < MAX_HANDLERS && vector >= 0)
{
old_handler = isr_table[vector].handler;

View File

@ -78,7 +78,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
{
rt_isr_handler_t old_handler = RT_NULL;
if (vector < MAX_HANDLERS || vector >= 0)
if (vector < MAX_HANDLERS && vector >= 0)
{
old_handler = isr_table[vector].handler;