summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-06 16:16:25 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-06 16:16:25 +0000
commit91370409aede963a205b1f9987a3594d6d4e3928 (patch)
treeb00df8498d34daa92298805b2f4dadf31c5d9eda /src/char_sql/char.c
parentdb118dccc74b5c9c0694cdfa863b33ed6984c0fb (diff)
downloadhercules-91370409aede963a205b1f9987a3594d6d4e3928.tar.gz
hercules-91370409aede963a205b1f9987a3594d6d4e3928.tar.bz2
hercules-91370409aede963a205b1f9987a3594d6d4e3928.tar.xz
hercules-91370409aede963a205b1f9987a3594d6d4e3928.zip
- Corrected the define for NK no cardfix (def).
- Updated skills that shouldn't ignore the target's cards: Smoking, Fling, Zenynage - Fixed the char sql server not escaping the server name before inserting it on the ragsrvinfo table. - Corrected @lvup not doing the party even share check. - Corrected breaker's misc part not ignoring element. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9969 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r--src/char_sql/char.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index f93db50af..de0b79bd1 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -3003,13 +3003,14 @@ int parse_frommap(int fd) {
if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,8))
return 0;
{
- char motd[256], t_name[512]; //Required for jstrescapecpy [Skotlex]
+ char motd[256], t_name[2*sizeof(char)*sizeof(server_name)+1], t_motd[512]; //Required for jstrescapecpy [Skotlex]
strncpy(motd, RFIFOP(fd,10), 255); //First copy it to make sure the motd fits.
motd[255]='\0';
- jstrescapecpy(t_name,motd);
-
+ jstrescapecpy(t_motd,motd);
+ jstrescapecpy(t_name,server_name);
+
sprintf(tmp_sql, "INSERT INTO `ragsrvinfo` SET `index`='%d',`name`='%s',`exp`='%d',`jexp`='%d',`drop`='%d',`motd`='%s'",
- fd, server_name, RFIFOW(fd,2), RFIFOW(fd,4), RFIFOW(fd,6), t_name);
+ fd, t_name, RFIFOW(fd,2), RFIFOW(fd,4), RFIFOW(fd,6), t_motd);
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);