diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/account_sql.c | 4 | ||||
-rw-r--r-- | src/login/login.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 565dd0460..d3a7aafff 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -315,7 +315,7 @@ static bool account_db_sql_set_property(AccountDB* self, const char* key, const safestrncpy(db->codepage, value, sizeof(db->codepage)); else if( strcmpi(key, "case_sensitive") == 0 ) - db->case_sensitive = config_switch(value); + db->case_sensitive = (bool)config_switch(value); else if( strcmpi(key, "account_db") == 0 ) safestrncpy(db->account_db, value, sizeof(db->account_db)); @@ -549,7 +549,7 @@ static bool mmo_auth_fromsql(AccountDB_SQL* db, struct mmo_account* acc, int acc SQL->GetData(sql_handle, 10, &data, NULL); safestrncpy(acc->lastlogin, data, sizeof(acc->lastlogin)); SQL->GetData(sql_handle, 11, &data, NULL); safestrncpy(acc->last_ip, data, sizeof(acc->last_ip)); SQL->GetData(sql_handle, 12, &data, NULL); safestrncpy(acc->birthdate, data, sizeof(acc->birthdate)); - SQL->GetData(sql_handle, 13, &data, NULL); acc->char_slots = atoi(data); + SQL->GetData(sql_handle, 13, &data, NULL); acc->char_slots = (uint8)atoi(data); SQL->GetData(sql_handle, 14, &data, NULL); safestrncpy(acc->pincode, data, sizeof(acc->pincode)); SQL->GetData(sql_handle, 15, &data, NULL); acc->pincode_change = atol(data); diff --git a/src/login/login.c b/src/login/login.c index 8dd5ce20a..2bfb9c730 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -467,7 +467,7 @@ int parse_fromchar(int fd) { ShowStatus("set users %s : %d\n", server[id].name, users); - server[id].users = users; + server[id].users = (uint16)users; } } break; @@ -1083,7 +1083,7 @@ int mmo_auth(struct login_session_data* sd, bool isServer) { sd->login_id2 = rnd() + 1; safestrncpy(sd->lastlogin, acc.lastlogin, sizeof(sd->lastlogin)); sd->sex = acc.sex; - sd->group_id = acc.group_id; + sd->group_id = (uint8)acc.group_id; // update account data timestamp2string(acc.lastlogin, sizeof(acc.lastlogin), time(NULL), "%Y-%m-%d %H:%M:%S"); |