diff options
-rw-r--r-- | Changelog-Trunk.txt | 1 | ||||
-rw-r--r-- | src/char_sql/int_guild.c | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 91ceb325a..a1e1b7bab 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/21
+ * Fixed SQL-Guild Creation, guild name was escaped 2 times [Toms]
* Some cleaning of the splash skills. Updated skill-attack to enable again
passing of flag 0xF000 which signals that the skill level sent to the
client should be -1 (no skill name shouted). Should (hopefully) clear/clean
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);
|