From 02e935ec7502b70fe85c9676bf8ddf0c15d9337e Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 31 Mar 2014 11:35:03 +0200 Subject: Check if Membership::GetPrefixChar() returns 0 before appending it to a string Spotted by @barosl --- src/modules/m_check.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/modules') 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(' '); } -- cgit v1.2.3