for (i = 0; i <= wordList.Length; i++)
It should be <, not <=.
<= will loop one too many times.