- Don't check outside of the array bounds

- Spotted by Marcelo Slomp <mslomp at linuxmail dot org>
See issue #3593 for more details.

svn path=/trunk/; revision=34892
This commit is contained in:
Ged Murphy 2008-07-28 08:45:38 +00:00
parent 795b09cde7
commit 36dab01cab

View file

@ -74,7 +74,7 @@ GenerateChars(SOCKET sock)
line[i] = chars[charIndex];
/* if we hit the end char, reset it */
if (chars[charIndex] == chars[NUM_CHARS])
if (chars[charIndex] == chars[NUM_CHARS - 1])
charIndex = 0;
else
charIndex++;