diff options
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index f413b8529..92348148b 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1403,11 +1403,8 @@ class TreeSocket : public InspSocket char result64[10240]; if (this->keylength) { - while (line.length() % this->keylength != 0) - { - // pad it to be a multiple of the key length - line = line + "\7"; - } + // pad it to the key length + line.append(line.length() % this->keylength,'\7'); } unsigned int ll = line.length(); ctx_out->Encrypt(line.c_str(), result, ll, 1); |