From 245c2d9d43d433a8ec2c71741c4e0c5281f5c0a8 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 27 Feb 2015 01:30:40 +0100 Subject: Fix miscalculation of maxlen in Channel::UserList() introduced by the WriteNumeric() conversion --- src/channels.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/channels.cpp b/src/channels.cpp index 948538ff4..e06e4c6fc 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -598,7 +598,7 @@ void Channel::UserList(User* user, bool has_user) list.append(this->name).append(" :"); std::string::size_type pos = list.size(); - const size_t maxlen = ServerInstance->Config->Limits.MaxLine - 10 - ServerInstance->Config->ServerName.size(); + const size_t maxlen = ServerInstance->Config->Limits.MaxLine - 10 - ServerInstance->Config->ServerName.size() - user->nick.size(); std::string prefixlist; std::string nick; for (MemberMap::iterator i = userlist.begin(); i != userlist.end(); ++i) -- cgit v1.2.3