Off-by-one error(fencepost error)

A count that is one too many or one too few, usually at the first or last item. The classic cause is mixing a length with a last index: an array of 5 items has indexes 0 to 4.

Back to the glossary