summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index c0bf7946d..58afe4587 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -4879,7 +4879,7 @@ bool mob_skill_db_libconfig_sub(struct config_setting_t *it, int n)
bool mob_skill_db_libconfig_sub_skill(struct config_setting_t *it, int n, int mob_id)
{
- int i, j;
+ int i, j, idx = 0;
int i32;
int skill_id = 0;
int skill_idx = 0;
@@ -4910,8 +4910,8 @@ bool mob_skill_db_libconfig_sub_skill(struct config_setting_t *it, int n, int mo
memset(&gms, 0, sizeof (struct mob_skill));
ms = &gms;
} else {
- ARR_FIND(0, MAX_MOBSKILL, i, (ms = &mob->db_data[mob_id]->skill[i])->skill_id == 0);
- if (i == MAX_MOBSKILL) {
+ ARR_FIND(0, MAX_MOBSKILL, idx, (ms = &mob->db_data[mob_id]->skill[idx])->skill_id == 0);
+ if (idx == MAX_MOBSKILL) {
ShowError("mob_skill_db_libconfig_sub_skill: Too many skills for monster %d\n", mob_id);
return false;
}
@@ -5043,7 +5043,7 @@ bool mob_skill_db_libconfig_sub_skill(struct config_setting_t *it, int n, int mo
mob->db_data[i]->maxskill = j + 1;
}
} else { //Skill set on a single mob.
- mob->db_data[mob_id]->maxskill = i + 1;
+ mob->db_data[mob_id]->maxskill = idx + 1;
}
return true;