summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-08-27 01:13:59 +0200
committerHaru <haru@dotalux.com>2018-08-27 01:13:59 +0200
commit483341747ac3ecec9998d989b3f05af05474ea34 (patch)
tree0f8288c8d69600dfd60d02ebd1b36ad91a0f95b7 /src/map/mob.c
parenta7bee2cdb8b4d4a2a250d611be4babd27043b6db (diff)
downloadhercules-483341747ac3ecec9998d989b3f05af05474ea34.tar.gz
hercules-483341747ac3ecec9998d989b3f05af05474ea34.tar.bz2
hercules-483341747ac3ecec9998d989b3f05af05474ea34.tar.xz
hercules-483341747ac3ecec9998d989b3f05af05474ea34.zip
Fix some issues reported by gcc-8's address sanitizer
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 220ccc182..d398d938c 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -4955,7 +4955,6 @@ static bool mob_skill_db_libconfig_sub_skill(struct config_setting_t *it, int n,
int skill_id = 0;
int skill_idx = 0;
bool clearskills = false;
- char valname[5];
const char *name = config_setting_name(it);
struct mob_skill *ms, gms;
@@ -5055,6 +5054,7 @@ static bool mob_skill_db_libconfig_sub_skill(struct config_setting_t *it, int n,
ms->cond2 = i32;
for (i = 0; i < 5; i++) {
+ char valname[16];
sprintf(valname, "val%1d", i);
if (libconfig->setting_lookup_int(it, valname, &i32))
ms->val[i] = i32;