Closed FabienTschanz closed 1 month ago
Oh the old re-use of i and j in loops, I was looking at this and wondered why the main loop (where i is used at the top) didn't break out, but had to do something else and didn't look further.
LGTM 🚀
Oh the old re-use of i and j in loops, I was looking at this and wondered why the main loop (where i is used at the top) didn't break out, but had to do something else and didn't look further.
LGTM 🚀
You'd prefer us to go with $a and $b instead? :) Thanks for looking into this folks.
Oh the old re-use of i and j in loops, I was looking at this and wondered why the main loop (where i is used at the top) didn't break out, but had to do something else and didn't look further. LGTM 🚀
You'd prefer us to go with $a and $b instead? :) Thanks for looking into this folks.
I guess one could also use x and y or some oddly named other stuff, just for the lols 😄
This PR fixes an infinite loop with a reused
$i
variable inside of a nested loop. The current outer loop iterator$i
was reassigned in the nested loop, leading to infinite executions. The inner loop variable was renamed to$j
.