correct out-of-bounds array access due to one-off error.
gcc was warning about "unspecified behavior", but coverity nailed this one. CID 136451, CID 136460