summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-05-16 21:34:45 +0200
committerattilamolnar <attilamolnar@hush.com>2013-05-16 21:34:45 +0200
commit842245a8d4b59fe2ad9f7709ef5f56d6c48a4c7c (patch)
tree50a46bc254e3a3d389749729612230944845b673
parentf79e9a3e8019be35edd95cd4455910212f872ce9 (diff)
Fix padding bug in GenerateSID(), spotted by @ShutterQuick
-rw-r--r--src/server.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/server.cpp b/src/server.cpp
index c2068d75b..2e6109202 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -88,6 +88,7 @@ std::string UIDGenerator::GenerateSID(const std::string& servername, const std::
sid = 5 * sid + *i;
std::string sidstr = ConvToStr(sid % 1000);
+ sidstr.insert(0, 3 - sidstr.length(), '0');
return sidstr;
}