diff options
Diffstat (limited to 'src/char_sql')
-rw-r--r-- | src/char_sql/inter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c index 0f956118c..a8e0d4f44 100644 --- a/src/char_sql/inter.c +++ b/src/char_sql/inter.c @@ -423,6 +423,7 @@ int mapif_parse_GMmessage(int fd) int mapif_parse_WisRequest(int fd) { struct WisData* wd; static int wisid = 0; + char t_name[32]; if (RFIFOW(fd,2)-52 >= sizeof(wd->msg)) { printf("inter: Wis message size too long.\n"); @@ -431,7 +432,8 @@ int mapif_parse_WisRequest(int fd) { printf("inter: Wis message doesn't exist.\n"); return 0; } - sprintf (tmp_sql, "SELECT `name` FROM `%s` WHERE `name`='%s'",char_db, RFIFOP(fd,28)); + sprintf (tmp_sql, "SELECT `name` FROM `%s` WHERE `name`='%s'", + char_db, jstrescapecpy(t_name, (char *)RFIFOP(fd,28))); if(mysql_query(&mysql_handle, tmp_sql) ) { printf("DB server Error - %s\n", mysql_error(&mysql_handle) ); } |