Added check for division by 0 in m_message.c Hopefully fixes #25
This commit is contained in:
parent
e0b0e08d25
commit
829ce93fb8
|
@ -554,7 +554,8 @@ msg_channel(int p_or_n, const char *command,
|
||||||
caps++;
|
caps++;
|
||||||
len++;
|
len++;
|
||||||
}
|
}
|
||||||
if(((caps*100)/(len)) >= 50)
|
/* Added divide by 0 check --alxbl */
|
||||||
|
if(len != 0 && ((caps*100)/(len)) >= 50)
|
||||||
{
|
{
|
||||||
sendto_one_numeric(source_p, 404, "%s :Cannot send to channel - Your message contains mostly capital letters (+G set)", chptr->chname);
|
sendto_one_numeric(source_p, 404, "%s :Cannot send to channel - Your message contains mostly capital letters (+G set)", chptr->chname);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue