summaryrefslogtreecommitdiff
path: root/src/login/login.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-18 20:35:14 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-18 20:35:14 +0000
commit3fffd37b5c8c579ffd540ac60c97a047f2d6eda1 (patch)
tree7431afbf222f08190e7e640a2d301ebc6982255d /src/login/login.c
parent9931cc22ecf92962c9a3218d075b55a44152862a (diff)
downloadhercules-3fffd37b5c8c579ffd540ac60c97a047f2d6eda1.tar.gz
hercules-3fffd37b5c8c579ffd540ac60c97a047f2d6eda1.tar.bz2
hercules-3fffd37b5c8c579ffd540ac60c97a047f2d6eda1.tar.xz
hercules-3fffd37b5c8c579ffd540ac60c97a047f2d6eda1.zip
- Fixed a sad crash in the login-txt server. Thanks to Flavio JS for pointing it out.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8352 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/login/login.c')
-rw-r--r--src/login/login.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/login/login.c b/src/login/login.c
index 8dd82cffb..f76bd44cf 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -3337,7 +3337,7 @@ int parse_login(int fd) {
case 0x7530: // Request of the server version
login_log("Sending of the server version (ip: %s)" RETCODE, ip);
- WFIFOHEAD(fd, 10);
+ WFIFOHEAD(fd, 10);
WFIFOW(fd,0) = 0x7531;
WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
WFIFOB(fd,3) = ATHENA_MINOR_VERSION;
@@ -3365,7 +3365,7 @@ int parse_login(int fd) {
} else {
struct login_session_data *ld = (struct login_session_data*)session[fd]->session_data;
if (RFIFOW(fd,2) == 0) { // non encrypted password
- char* password="";
+ char password[25];
memcpy(password, RFIFOP(fd,4), 24);
password[24] = '\0';
remove_control_chars((unsigned char *)password);