summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-16 18:57:11 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-16 18:57:11 +0000
commitd2c7993041b33465085bff7103d5554ae1bd02bd (patch)
tree4ac99e41857adf3ca6f0c8405a75a5a345db883a /src
parent0dd237c9a9d574537c6b19aeda18fbee08afe4cb (diff)
Extra tweak for exceptional condition
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3232 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree.cpp4
1 files changed, 3 insertions, 1 deletions
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);