diff --git a/tasks.c b/tasks.c index 5e3f647b93..4b7fea505b 100644 --- a/tasks.c +++ b/tasks.c @@ -2101,7 +2101,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode, { if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority ) { - pxCurrentTCB = pxTCB; + pxCurrentTCB = pxNewTCB; } else {