summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-15 04:41:34 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-15 04:41:34 +0000
commitcfa0ad0b50bcf0eed041ffbd867eed1929280f9b (patch)
tree6faa8098173347e95ef515f60176c8629b46ddbf /src
parent5f33af0fbf4a079cfa052c42a05cb40edc6c2125 (diff)
downloadhercules-cfa0ad0b50bcf0eed041ffbd867eed1929280f9b.tar.gz
hercules-cfa0ad0b50bcf0eed041ffbd867eed1929280f9b.tar.bz2
hercules-cfa0ad0b50bcf0eed041ffbd867eed1929280f9b.tar.xz
hercules-cfa0ad0b50bcf0eed041ffbd867eed1929280f9b.zip
- Small change in the login-sql server that prevens crashes when somehow people change the lastlogin column to accept nulls.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10011 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/login_sql/login.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index 8898bfa2a..8dce72ceb 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -875,8 +875,7 @@ int mmo_auth( struct mmo_account* account , int fd){
account->account_id = atoi(sql_row[0]);
account->login_id1 = rand();
account->login_id2 = rand();
- memcpy(tmpstr, sql_row[3], 19);
- memcpy(account->lastlogin, tmpstr, 24);
+ strncpy(account->lastlogin, sql_row[3], 24);
account->sex = sql_row[5][0] == 'S' ? 2 : sql_row[5][0]=='M';
account->level = atoi(sql_row[10]) > 99 ? 99 : atoi(sql_row[10]); // as was in isGM() [zzo]