summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-04 13:59:42 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-04 13:59:42 +0000
commit5edc20529759c12add3da5c3ed0a1cfe335de6b8 (patch)
treeb56a90c9e21301b4117e53cda82c9362aeaab761 /src/char_sql
parent12966eebf5750b2dc0a4394204aaf6d2b1d554db (diff)
downloadhercules-5edc20529759c12add3da5c3ed0a1cfe335de6b8.tar.gz
hercules-5edc20529759c12add3da5c3ed0a1cfe335de6b8.tar.bz2
hercules-5edc20529759c12add3da5c3ed0a1cfe335de6b8.tar.xz
hercules-5edc20529759c12add3da5c3ed0a1cfe335de6b8.zip
- Fixed the txt->sql converter not escaping character names before saving them.
- Fixed a pet's level not resetting to their db level when you enable pet leveling and later on decide to turn it off. - Fixed a bad initialization in pc_setnewpc - Fixed restricted equipment not updating your view info after they are unequipped. - Removed a bunch of extra text/checks when ignoring characters (/ex) when Aegis does none of these checks. /inall now wipes your ignore list (it does this on Aegis, too). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9400 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/char.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 36fb788de..136453e3b 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -492,15 +492,18 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
if (!memitemdata_to_sql(mapitem, count, p->char_id,TABLE_CART))
strcat(save_status, " cart");
#ifdef TXT_SQL_CONVERT
- //Insert the barebones to then update the rest.
+{ //Insert the barebones to then update the rest.
+ char t_name[NAME_LENGTH*2];
+ jstrescapecpy(t_name, p->name);
sprintf(tmp_sql, "REPLACE INTO `%s` (`account_id`, `char_num`, `name`) VALUES ('%d', '%d', '%s')",
- char_db, p->account_id, p->char_num, p->name);
+ char_db, p->account_id, p->char_num, 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);
} else
strcat(save_status, " creation");
+}
#endif
if (