summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-03-31 11:35:03 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-03-31 11:35:03 +0200
commit02e935ec7502b70fe85c9676bf8ddf0c15d9337e (patch)
treec8dbee8437fe6a8b9b66d51cdfd70f01aa20c9ef /src/modules
parent704159e1fc6f71d4edc92ae815fe62a01f9f99fa (diff)
Check if Membership::GetPrefixChar() returns 0 before appending it to a string
Spotted by @barosl
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_check.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index ad0e2394d..35901f8d5 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -194,7 +194,9 @@ class CommandCheck : public Command
{
Membership* memb = *i;
Channel* c = memb->chan;
- chliststr.push_back(memb->GetPrefixChar());
+ char prefix = memb->GetPrefixChar();
+ if (prefix)
+ chliststr.push_back(prefix);
chliststr.append(c->name).push_back(' ');
}