mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-11-16 12:34:33 +00:00
逻辑错误
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user