Commit e175f027 authored by Evan Hunter's avatar Evan Hunter Committed by Øyvind Harboe
Browse files

Fix off by one bug in FreeRTOS

parent 4bcf37e2
......@@ -233,10 +233,10 @@ static int FreeRTOS_update_threads( struct rtos *rtos )
retval = target_read_buffer( rtos->target, rtos->symbols[FreeRTOS_VAL_uxTopUsedPriority].address, param->pointer_width, (uint8_t *)&max_used_priority );
symbol_address_t* list_of_lists = (symbol_address_t *)malloc( sizeof( symbol_address_t ) * ( max_used_priority + 5 ) );
symbol_address_t* list_of_lists = (symbol_address_t *)malloc( sizeof( symbol_address_t ) * ( max_used_priority+1 + 5 ) );
int num_lists;
for( num_lists = 0; num_lists < max_used_priority; num_lists++ )
for( num_lists = 0; num_lists <= max_used_priority; num_lists++ )
{
list_of_lists[num_lists] = rtos->symbols[FreeRTOS_VAL_pxReadyTasksLists].address + num_lists * param->list_width;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment