Skip to content
Snippets Groups Projects
Commit 9a502efc authored by rswindell's avatar rswindell
Browse files

Fix segfault found to access_denied.

parent 0b417907
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment