summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-03-11 16:31:31 -0300
committershennetsind <ind@henn.et>2013-03-11 16:31:31 -0300
commitebc14bcfc958d8fd31e42435da449f7bb3756f72 (patch)
tree4a555620a1680baf15d4bffb25fdd74d52cb9af0 /src/login
parentd60192f04903705e489378ea09f62b6326f791cb (diff)
downloadhercules-ebc14bcfc958d8fd31e42435da449f7bb3756f72.tar.gz
hercules-ebc14bcfc958d8fd31e42435da449f7bb3756f72.tar.bz2
hercules-ebc14bcfc958d8fd31e42435da449f7bb3756f72.tar.xz
hercules-ebc14bcfc958d8fd31e42435da449f7bb3756f72.zip
Follow up d2d734ce0983fbed72e69f555f57f29de04f30b3
Special Thanks to Euphy and his hawk eyes. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/login')
-rw-r--r--src/login/account_sql.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 6f21cbb6c..9fbe50727 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -615,16 +615,14 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 11, SQLDT_STRING, (void*)&acc->last_ip, strlen(acc->last_ip))
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 12, SQLDT_STRING, (void*)&acc->birthdate, strlen(acc->birthdate))
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 13, SQLDT_UCHAR, (void*)&acc->char_slots, sizeof(acc->char_slots))
- || SQL_SUCCESS != SqlStmt_BindParam(stmt, 14, SQLDT_STRING, (void*)&acc->pincode, sizeof(acc->pincode))
+ || SQL_SUCCESS != SqlStmt_BindParam(stmt, 14, SQLDT_STRING, (void*)&acc->pincode, strlen(acc->pincode))
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 15, SQLDT_LONG, (void*)&acc->pincode_change, sizeof(acc->pincode_change))
|| SQL_SUCCESS != SqlStmt_Execute(stmt)
) {
SqlStmt_ShowDebug(stmt);
break;
}
- }
- else
- {// update account table
+ } else {// update account table
if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "UPDATE `%s` SET `userid`=?,`user_pass`=?,`sex`=?,`email`=?,`group_id`=?,`state`=?,`unban_time`=?,`expiration_time`=?,`logincount`=?,`lastlogin`=?,`last_ip`=?,`birthdate`=?,`character_slots`=?,`pincode`=?,`pincode_change`=? WHERE `account_id` = '%d'", db->account_db, acc->account_id)
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 0, SQLDT_STRING, (void*)acc->userid, strlen(acc->userid))
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 1, SQLDT_STRING, (void*)acc->pass, strlen(acc->pass))