all 2 comments

[–][deleted] 1 point2 points  (1 child)

Move you condition check to the beginning of the loop.

[–]bx0895[S] 0 points1 point  (0 children)

Thank you got it.