- Small change in the login-sql server that prevens crashes when somehow people change the lastlogin column to accept nulls.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10011 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2007-03-15 04:41:34 +00:00
parent 95b2bfbc14
commit fec9da329e

View File

@ -875,8 +875,7 @@ int mmo_auth( struct mmo_account* account , int fd){
account->account_id = atoi(sql_row[0]); account->account_id = atoi(sql_row[0]);
account->login_id1 = rand(); account->login_id1 = rand();
account->login_id2 = rand(); account->login_id2 = rand();
memcpy(tmpstr, sql_row[3], 19); strncpy(account->lastlogin, sql_row[3], 24);
memcpy(account->lastlogin, tmpstr, 24);
account->sex = sql_row[5][0] == 'S' ? 2 : sql_row[5][0]=='M'; 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] account->level = atoi(sql_row[10]) > 99 ? 99 : atoi(sql_row[10]); // as was in isGM() [zzo]