mirror of
https://github.com/znc/znc.git
synced 2026-05-08 22:34:45 +02:00
Fix a division by zero bug
Thanks to Sickness for reporting this and providing backtraces and for flakes for writing a first patch that Sickness tested. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1603 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -704,6 +704,10 @@ CChan* CUser::FindChan(const CString& sName) const {
|
||||
}
|
||||
|
||||
void CUser::JoinChans() {
|
||||
// Avoid divsion by zero, it's bad!
|
||||
if (m_vChans.size() == 0)
|
||||
return;
|
||||
|
||||
// We start at a random offset into the channel list so that if your
|
||||
// first 3 channels are invite-only and you got MaxJoins == 3, ZNC will
|
||||
// still be able to join the rest of your channels.
|
||||
|
||||
Reference in New Issue
Block a user