Bakery algorithm

The basic idea is that the process with least token (number) value (not 0) will execute their critical

But in the second while condition (number[i],i < number[j],j) meant that process i will wait which is contradicting the fact that the process with least token value should execute.
I feel it should be ,
‘process i’ will wait if
(number[i],i > number[j],j)
@championswimmer-t

yes, you are right. It should be number[i],i>number[j],j. This means atleast one process with smaller token value exists, then process i will wait.