diff options
-rw-r--r-- | include/uid.h | 2 | ||||
-rw-r--r-- | src/server.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/uid.h b/include/uid.h index 63b3e89f2..f5384049c 100644 --- a/include/uid.h +++ b/include/uid.h @@ -16,6 +16,6 @@ * This length is set in compliance with TS6 protocol, and really should not be changed. Ever. * It allows for a lot of clients as-is. -- w00t. */ -#define UUID_LENGTH 9 +#define UUID_LENGTH 10 diff --git a/src/server.cpp b/src/server.cpp index f69b4fd3b..d0023edd4 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -206,13 +206,13 @@ std::string InspIRCd::GetUID() current_uid[1] = Config->sid[1]; current_uid[2] = Config->sid[2]; - for (int i = 3; i < UUID_LENGTH; i++) + for (int i = 3; i < (UUID_LENGTH - 1); i++) current_uid[i] = '9'; - curindex = UUID_LENGTH - 1; // look at the end of the string now kthx + curindex = UUID_LENGTH - 2; // look at the end of the string now kthx, ignore null // Null terminator. Important. - current_uid[UUID_LENGTH] = '\0'; + current_uid[UUID_LENGTH - 1] = '\0'; } while (1) |