From: brain Date: Thu, 16 Feb 2006 18:57:11 +0000 (+0000) Subject: Extra tweak for exceptional condition X-Git-Tag: v2.0.23~8856 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=d2c7993041b33465085bff7103d5554ae1bd02bd;p=user%2Fhenk%2Fcode%2Finspircd.git Extra tweak for exceptional condition git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3232 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 92348148b..734640895 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1404,7 +1404,9 @@ class TreeSocket : public InspSocket if (this->keylength) { // pad it to the key length - line.append(line.length() % this->keylength,'\7'); + int n = line.length() % this->keylength; + if (n) + line.append(n,'\7'); } unsigned int ll = line.length(); ctx_out->Encrypt(line.c_str(), result, ll, 1);