diff options
Diffstat (limited to 'src/elogin')
-rw-r--r-- | src/elogin/md5calc.c | 2 | ||||
-rw-r--r-- | src/elogin/mt_rand.c | 2 | ||||
-rw-r--r-- | src/elogin/parse.c | 4 | ||||
-rw-r--r-- | src/elogin/send.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/elogin/md5calc.c b/src/elogin/md5calc.c index 87c4a52..9bb9460 100644 --- a/src/elogin/md5calc.c +++ b/src/elogin/md5calc.c @@ -238,7 +238,7 @@ void MD5_String2binary (const char *string, char *output) //Step 1.Append Padding Bits (extension of a mark bit) //1-1 - string_byte_len = strlen (string); //The byte chief of a character sequence is acquired. + string_byte_len = (unsigned int)strlen(string); //The byte chief of a character sequence is acquired. pstring = (unsigned char *) string; //The position of the present character sequence is set. //1-2 Repeat calculation until length becomes less than 64 bytes. diff --git a/src/elogin/mt_rand.c b/src/elogin/mt_rand.c index 627d9dd..8f1bc36 100644 --- a/src/elogin/mt_rand.c +++ b/src/elogin/mt_rand.c @@ -114,5 +114,5 @@ int mt_rand (void) while (r >> 16) r = (r & 0xFFFF) + (r >> 16); - return (r); + return (int)(r); } diff --git a/src/elogin/parse.c b/src/elogin/parse.c index 3140615..3e0155a 100644 --- a/src/elogin/parse.c +++ b/src/elogin/parse.c @@ -55,7 +55,7 @@ int elogin_client_login_pre(int *fdPtr, } char username[NAME_LENGTH]; safestrncpy(username, RFIFOP(fd, 6), NAME_LENGTH); - int len = safestrnlen(username, NAME_LENGTH); + int len = (int)safestrnlen(username, NAME_LENGTH); if (clientVersion < 2) { lclif->login_error(fd, 5); @@ -94,7 +94,7 @@ void elogin_parse_client_login2(int fd) safestrncpy(username, RFIFOP(fd, 2), NAME_LENGTH); - int len = safestrnlen(username, NAME_LENGTH); + int len = (int)safestrnlen(username, NAME_LENGTH); if (len < 2 || !(username[len - 2] == '_') || !memchr("FfMm", username[len - 1], 4)) { lclif->login_error(fd, 3); diff --git a/src/elogin/send.c b/src/elogin/send.c index a8bc99b..01c2906 100644 --- a/src/elogin/send.c +++ b/src/elogin/send.c @@ -34,7 +34,7 @@ void send_update_host(int fd) { if (!update_server) return; - const int sz = strlen(update_server); + const int sz = (int)strlen(update_server); WFIFOHEAD(fd, sz + 4); WFIFOW(fd, 0) = 0x63; WFIFOW(fd, 2) = sz + 4; |