Most of the code seems to consistently use 0-index counts, such that variables like total_rows are actually the total rows minus 1. If this is truly consistent, then there is no bug. That said, it's terribly confusing to count real rows as 0 = 1, 1 = 2, etc.
Most of the code seems to consistently use 0-index counts, such that variables like
total_rowsare actually the total rows minus 1. If this is truly consistent, then there is no bug. That said, it's terribly confusing to count real rows as 0 = 1, 1 = 2, etc.