d85ca47184
Instead of checking for overflow at the end of each iteration, calculate the actual final loop parameter value before the loop, save it to the local variable and at the end of the iteration check if the loop parameter is exactly equal to this final value. ProgressionUtil.getProgressionFinalElement() credits go to @geevee