summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);