summaryrefslogtreecommitdiff
path: root/src/login/login.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-11-09 05:53:48 +0100
committerHaru <haru@dotalux.com>2014-11-09 05:53:48 +0100
commit3742a813233edca6a59cc027209b8cd6bfd6b70b (patch)
tree70422f67586aa2b2d04f80a5e13eca53150db2c7 /src/login/login.c
parent26313b22532179ae8b8938d000ca820983318161 (diff)
downloadhercules-3742a813233edca6a59cc027209b8cd6bfd6b70b.tar.gz
hercules-3742a813233edca6a59cc027209b8cd6bfd6b70b.tar.bz2
hercules-3742a813233edca6a59cc027209b8cd6bfd6b70b.tar.xz
hercules-3742a813233edca6a59cc027209b8cd6bfd6b70b.zip
Fixed a compilation error in MSVC <= 2012
Special thanks to Angelmelody Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/login/login.c')
-rw-r--r--src/login/login.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/login/login.c b/src/login/login.c
index fe5d08835..03921a413 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1432,6 +1432,7 @@ bool login_parse_client_login(int fd, struct login_session_data* sd, const char
char password[PASSWD_LEN];
unsigned char passhash[16];
uint8 clienttype;
+ int result;
uint16 command = RFIFOW(fd,0);
bool israwpass = (command==0x0064 || command==0x0277 || command==0x02b0 || command == 0x0825);
@@ -1495,7 +1496,7 @@ bool login_parse_client_login(int fd, struct login_session_data* sd, const char
return true;
}
- int result = login->mmo_auth(sd, false);
+ result = login->mmo_auth(sd, false);
if( result == -1 )
login->auth_ok(sd);
@@ -1538,6 +1539,7 @@ void login_parse_request_connection(int fd, struct login_session_data* sd, const
uint16 server_port;
uint16 type;
uint16 new_;
+ int result;
safestrncpy(sd->userid, (char*)RFIFOP(fd,2), NAME_LENGTH);
safestrncpy(sd->passwd, (char*)RFIFOP(fd,26), NAME_LENGTH);
@@ -1556,7 +1558,7 @@ void login_parse_request_connection(int fd, struct login_session_data* sd, const
sprintf(message, "charserver - %s@%u.%u.%u.%u:%u", server_name, CONVIP(server_ip), server_port);
login_log(session[fd]->client_addr, sd->userid, 100, message);
- int result = login->mmo_auth(sd, true);
+ result = login->mmo_auth(sd, true);
if( runflag == LOGINSERVER_ST_RUNNING &&
result == -1 &&
sd->sex == 'S' &&