Commit 9a502efc authored by rswindell's avatar rswindell

Fix segfault found to access_denied.

parent 0b417907
......@@ -1743,7 +1743,7 @@ void sbbs_t::guruchat(char* line, char* gurubuf, int gurunum, char* last_answer)
mswait(500+sbbs_random(1000)); /* thinking time */
if(action!=NODE_MCHT) {
for(i=0;i<k;i++) {
if(mistakes && theanswer[i]!=theanswer[i-1] &&
if(i && mistakes && theanswer[i]!=theanswer[i-1] &&
((!isalnum(theanswer[i]) && !sbbs_random(100))
|| (isalnum(theanswer[i]) && !sbbs_random(30)))) {
c=j=((uint)sbbs_random(3)+1); /* 1 to 3 chars */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment