Fixed SQL-Guild Creation, guild name was escaped 2 times

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8413 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
toms
2006-08-21 21:44:52 +00:00
parent df20c4e1d2
commit cc6ddef2e4
2 changed files with 5 additions and 2 deletions

View File

@@ -840,9 +840,11 @@ void inter_guild_sql_final(void)
int search_guildname(char *str)
{
int guild_id;
char t_name[NAME_LENGTH*2];
jstrescapecpy(t_name, str);
//Lookup guilds with the same name
sprintf (tmp_sql , "SELECT guild_id FROM `%s` WHERE name='%s'",guild_db,jstrescape(str));
sprintf (tmp_sql , "SELECT guild_id FROM `%s` WHERE name='%s'", guild_db, t_name);
if(mysql_query(&mysql_handle, tmp_sql) ) {
ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);