Fix a potential buffer overrun from an off-by-one error.

An internal static analyzer found this possible overrun, which was pretty easy to fix.