summaryrefslogtreecommitdiff
path: root/src/char_sql/int_guild.c
diff options
context:
space:
mode:
authortoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-21 21:44:52 +0000
committertoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-21 21:44:52 +0000
commit231a3b4ee0bc05308bcf24051dc2ab34fe1f7f5a (patch)
tree48067e999a592d1d66bbd55459880b0cbc3ef340 /src/char_sql/int_guild.c
parent92ece480f5e9155fe9e29ce185d040efc33500dd (diff)
downloadhercules-231a3b4ee0bc05308bcf24051dc2ab34fe1f7f5a.tar.gz
hercules-231a3b4ee0bc05308bcf24051dc2ab34fe1f7f5a.tar.bz2
hercules-231a3b4ee0bc05308bcf24051dc2ab34fe1f7f5a.tar.xz
hercules-231a3b4ee0bc05308bcf24051dc2ab34fe1f7f5a.zip
Fixed SQL-Guild Creation, guild name was escaped 2 times
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8413 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_guild.c')
-rw-r--r--src/char_sql/int_guild.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index 2d2c871f9..d7f4ea5fa 100644
--- a/src/char_sql/int_guild.c
+++ b/src/char_sql/int_guild.c
@@ -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);