diff options
author | Haru <haru@dotalux.com> | 2019-04-07 21:09:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-07 21:09:52 +0200 |
commit | 166d8422ea70873c8ad8225bf954b93afae2a99f (patch) | |
tree | 7af4eae2e1e7996a7e3e2bb074a4f9a78988d6ca | |
parent | 9230404b22d755cf90524e1f67cceaa754da22de (diff) | |
parent | a944acfba95c28ca273729c128a1fc0f5629910d (diff) | |
download | hercules-166d8422ea70873c8ad8225bf954b93afae2a99f.tar.gz hercules-166d8422ea70873c8ad8225bf954b93afae2a99f.tar.bz2 hercules-166d8422ea70873c8ad8225bf954b93afae2a99f.tar.xz hercules-166d8422ea70873c8ad8225bf954b93afae2a99f.zip |
Merge pull request #2416 from louisplag/patch-2
update db2sql
-rw-r--r-- | src/plugins/db2sql.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index 2ece501b2..159d4e2a6 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -956,6 +956,7 @@ bool mobskilldb2sql_sub(struct config_setting_t *it, int n, int mob_id) struct mob_db *md = mob->db(mob_id); char valname[15]; const char *name = config_setting_name(it); + char e_name[NAME_LENGTH*2+1]; nullpo_retr(false, it); Assert_retr(false, mob_id <= 0 || md != mob->dummy); @@ -966,7 +967,8 @@ bool mobskilldb2sql_sub(struct config_setting_t *it, int n, int mob_id) StrBuf->Printf(&buf, "%d,", mob_id); // Info - StrBuf->Printf(&buf, "'%s@%s',", md->name, name); + SQL->EscapeString(NULL, e_name, md->name); + StrBuf->Printf(&buf, "'%s@%s',", e_name, name); if (mob->lookup_const(it, "SkillState", &i32) && (i32 < MSS_ANY || i32 > MSS_ANYTARGET)) { ShowWarning("mob_skill_db_libconfig_sub_skill: Invalid skill state %d for skill '%s' in monster %d, defaulting to MSS_ANY.\n", i32, name, mob_id); |