diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/helperfuncs.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index d9b4c7fa8..385ecedbe 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -389,7 +389,7 @@ void WriteCommon(userrec *u, char* text, ...) va_end(argsPtr); // FIX: Stops a message going to the same person more than once - memset(&already_sent,0,65536); + memset(&already_sent,0,MAXCLIENTS); bool sent_to_at_least_one = false; @@ -398,7 +398,8 @@ void WriteCommon(userrec *u, char* text, ...) if (u->chans[i].channel) { std::vector<char*> *ulist = u->chans[i].channel->GetUsers(); - for (unsigned int j = 0; j < ulist->size(); j++) + unsigned int x = ulist->size(); + for (unsigned int j = 0; j < x; j++) { char* o = (*ulist)[j]; userrec* otheruser = (userrec*)o; |