diff --git a/components/freertos/esp_additions/freertos_tasks_c_additions.h b/components/freertos/esp_additions/freertos_tasks_c_additions.h index 38bd6ac9df0d..9fcf05dee56e 100644 --- a/components/freertos/esp_additions/freertos_tasks_c_additions.h +++ b/components/freertos/esp_additions/freertos_tasks_c_additions.h @@ -917,7 +917,7 @@ static List_t * pxGetTaskListByIndex( UBaseType_t uxListIndex ) { pxTaskList = &pxReadyTasksLists[ configMAX_PRIORITIES - 1 - uxListIndex ]; } - else if( uxListIndex < configMAX_PRIORITIES + xNonReadyTaskListsCnt + 1 ) + else if( uxListIndex < configMAX_PRIORITIES + xNonReadyTaskListsCnt ) { pxTaskList = non_ready_task_lists[ uxListIndex - configMAX_PRIORITIES ]; }