diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/account_sql.c | 6 | ||||
-rw-r--r-- | src/login/login.c | 30 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/login/account_sql.c b/src/login/account_sql.c index be797c443..2a7401f1b 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -791,7 +791,7 @@ void mmo_send_accreg2(AccountDB* self, int fd, int account_id, int char_id) { WFIFOB(fd, plen) = (unsigned char)len;/* won't be higher; the column size is 32 */ plen += 1; - safestrncpy((char*)WFIFOP(fd,plen), data, len); + safestrncpy(WFIFOP(fd,plen), data, len); plen += len; SQL->GetData(sql_handle, 1, &data, NULL); @@ -805,7 +805,7 @@ void mmo_send_accreg2(AccountDB* self, int fd, int account_id, int char_id) { WFIFOB(fd, plen) = (unsigned char)len;/* won't be higher; the column size is 254 */ plen += 1; - safestrncpy((char*)WFIFOP(fd,plen), data, len); + safestrncpy(WFIFOP(fd,plen), data, len); plen += len; WFIFOW(fd, 14) += 1; @@ -859,7 +859,7 @@ void mmo_send_accreg2(AccountDB* self, int fd, int account_id, int char_id) { WFIFOB(fd, plen) = (unsigned char)len;/* won't be higher; the column size is 32 */ plen += 1; - safestrncpy((char*)WFIFOP(fd,plen), data, len); + safestrncpy(WFIFOP(fd,plen), data, len); plen += len; SQL->GetData(sql_handle, 1, &data, NULL); diff --git a/src/login/login.c b/src/login/login.c index cedaeec2b..73d2be9dd 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -391,22 +391,22 @@ void login_fromchar_account(int fd, int account_id, struct mmo_account *acc) if (pincode[0] == '\0') memset(pincode,'\0',sizeof(pincode)); - safestrncpy((char*)WFIFOP(fd,6), email, 40); + safestrncpy(WFIFOP(fd,6), email, 40); WFIFOL(fd,46) = (uint32)expiration_time; WFIFOB(fd,50) = (unsigned char)group_id; WFIFOB(fd,51) = char_slots; - safestrncpy((char*)WFIFOP(fd,52), birthdate, 10+1); - safestrncpy((char*)WFIFOP(fd,63), pincode, 4+1 ); + safestrncpy(WFIFOP(fd,52), birthdate, 10+1); + safestrncpy(WFIFOP(fd,63), pincode, 4+1 ); WFIFOL(fd,68) = acc->pincode_change; } else { - safestrncpy((char*)WFIFOP(fd,6), "", 40); + safestrncpy(WFIFOP(fd,6), "", 40); WFIFOL(fd,46) = 0; WFIFOB(fd,50) = 0; WFIFOB(fd,51) = 0; - safestrncpy((char*)WFIFOP(fd,52), "", 10+1); - safestrncpy((char*)WFIFOP(fd,63), "\0\0\0\0", 4+1 ); + safestrncpy(WFIFOP(fd,52), "", 10+1); + safestrncpy(WFIFOP(fd,63), "\0\0\0\0", 4+1 ); WFIFOL(fd,68) = 0; } WFIFOSET(fd,72); @@ -732,22 +732,22 @@ void login_fromchar_accinfo(int fd, int account_id, int u_fd, int u_aid, int u_g { WFIFOHEAD(fd,183); WFIFOW(fd,0) = 0x2737; - safestrncpy((char*)WFIFOP(fd,2), acc->userid, NAME_LENGTH); + safestrncpy(WFIFOP(fd,2), acc->userid, NAME_LENGTH); if (u_group >= acc->group_id) - safestrncpy((char*)WFIFOP(fd,26), acc->pass, 33); + safestrncpy(WFIFOP(fd,26), acc->pass, 33); else memset(WFIFOP(fd,26), '\0', 33); - safestrncpy((char*)WFIFOP(fd,59), acc->email, 40); - safestrncpy((char*)WFIFOP(fd,99), acc->last_ip, 16); + safestrncpy(WFIFOP(fd,59), acc->email, 40); + safestrncpy(WFIFOP(fd,99), acc->last_ip, 16); WFIFOL(fd,115) = acc->group_id; - safestrncpy((char*)WFIFOP(fd,119), acc->lastlogin, 24); + safestrncpy(WFIFOP(fd,119), acc->lastlogin, 24); WFIFOL(fd,143) = acc->logincount; WFIFOL(fd,147) = acc->state; if (u_group >= acc->group_id) - safestrncpy((char*)WFIFOP(fd,151), acc->pincode, 5); + safestrncpy(WFIFOP(fd,151), acc->pincode, 5); else memset(WFIFOP(fd,151), '\0', 5); - safestrncpy((char*)WFIFOP(fd,156), acc->birthdate, 11); + safestrncpy(WFIFOP(fd,156), acc->birthdate, 11); WFIFOL(fd,167) = map_fd; WFIFOL(fd,171) = u_fd; WFIFOL(fd,175) = u_aid; @@ -1373,7 +1373,7 @@ void login_auth_failed(struct login_session_data* sd, int result) else { // 6 = Your are Prohibited to log in until %s struct mmo_account acc; time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0; - timestamp2string((char*)WFIFOP(fd,6), 20, unban_time, login->config->date_format); + timestamp2string(WFIFOP(fd,6), 20, unban_time, login->config->date_format); } WFIFOSET(fd,26); #else @@ -1385,7 +1385,7 @@ void login_auth_failed(struct login_session_data* sd, int result) else { // 6 = Your are Prohibited to log in until %s struct mmo_account acc; time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0; - timestamp2string((char*)WFIFOP(fd,3), 20, unban_time, login->config->date_format); + timestamp2string(WFIFOP(fd,3), 20, unban_time, login->config->date_format); } WFIFOSET(fd,23); #endif |