fix: use right var to prevent crash

This commit is contained in:
2025-11-28 20:13:04 +01:00
parent 24dce6e737
commit f9cb7a6a8a

View File

@ -20,7 +20,7 @@ static struct list *get_thread_to_switch(void)
it_t = current_tcb == NULL ? NULL : current_tcb->next;
while (it_p) {
while (it_t != NULL) {
if (it_t != NULL && CURRENT_TCB->state != WAITING)
if (it_t != NULL && ((struct tcb*)it_t->content)->state != WAITING)
return it_t;
it_t = it_t->next;
}