diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-05-16 21:34:45 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-05-16 21:34:45 +0200 |
commit | 842245a8d4b59fe2ad9f7709ef5f56d6c48a4c7c (patch) | |
tree | 50a46bc254e3a3d389749729612230944845b673 | |
parent | f79e9a3e8019be35edd95cd4455910212f872ce9 (diff) |
Fix padding bug in GenerateSID(), spotted by @ShutterQuick
-rw-r--r-- | src/server.cpp | 1 |
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; } |