diff options
Diffstat (limited to 'src/char_sql')
-rw-r--r-- | src/char_sql/char.c | 12 | ||||
-rw-r--r-- | src/char_sql/char.h | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 876ea991d..7c0f75737 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -1219,11 +1219,11 @@ int make_new_char_sql(int fd, unsigned char *dat) { // Check Authorised letters/symbols in the name of the character if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised - for (i = 0; i < strlen(dat); i++) + for (i = 0; i < strlen(const char*dat); i++) if (strchr(char_name_letters, dat[i]) == NULL) return -1; } else if (char_name_option == 2) { // letters/symbols in char_name_letters are forbidden - for (i = 0; i < strlen(dat); i++) + for (i = 0; i < strlen(const char*)dat); i++) if (strchr(char_name_letters, dat[i]) != NULL) return -1; } // else, all letters/symbols are authorised (except control char removed before) @@ -2763,7 +2763,7 @@ int parse_char(int fd) { if (server_fd[i] < 0) break; } - if (i == MAX_MAP_SERVERS || strcmp(RFIFOP(fd,2), userid) || strcmp(RFIFOP(fd,26), passwd)) { + if (i == MAX_MAP_SERVERS || strcmp((const char*)RFIFOP(fd,2), userid) || strcmp((const char*)RFIFOP(fd,26), passwd)) { WFIFOB(fd,2) = 3; WFIFOSET(fd, 3); } else { @@ -2851,7 +2851,7 @@ int parse_console(char *buf) { } // MAP send all -int mapif_sendall(char *buf, unsigned int len) { +int mapif_sendall(unsigned char *buf, unsigned int len) { int i, c; int fd; @@ -2867,7 +2867,7 @@ int mapif_sendall(char *buf, unsigned int len) { return c; } -int mapif_sendallwos(int sfd, char *buf, unsigned int len) { +int mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) { int i, c; int fd; @@ -2883,7 +2883,7 @@ int mapif_sendallwos(int sfd, char *buf, unsigned int len) { return c; } -int mapif_send(int fd, char *buf, unsigned int len) { +int mapif_send(int fd, unsigned char *buf, unsigned int len) { int i; if (fd >= 0) { diff --git a/src/char_sql/char.h b/src/char_sql/char.h index 17a938780..c7261650b 100644 --- a/src/char_sql/char.h +++ b/src/char_sql/char.h @@ -41,9 +41,9 @@ struct itemtemp{ struct itemtmp equip[MAX_GUILD_STORAGE],notequip[MAX_GUILD_STORAGE]; }; int memitemdata_to_sql(struct itemtemp mapitem, int eqcount, int noteqcount, int char_id,int tableswitch); -int mapif_sendall(char *buf,unsigned int len); -int mapif_sendallwos(int fd,char *buf,unsigned int len); -int mapif_send(int fd,char *buf,unsigned int len); +int mapif_sendall(unsigned char *buf,unsigned int len); +int mapif_sendallwos(int fd,unsigned char *buf,unsigned int len); +int mapif_send(int fd,unsigned char *buf,unsigned int len); extern int autosave_interval; extern char db_path[]; |