From d2c7993041b33465085bff7103d5554ae1bd02bd Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 16 Feb 2006 18:57:11 +0000 Subject: Extra tweak for exceptional condition git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3232 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3