summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2015-01-17 18:49:03 -0200
committershennetsind <ind@henn.et>2015-01-17 18:49:03 -0200
commit3e53a34615c2535dbed3d7c2c7a00f1ef3eaff0a (patch)
tree2f646d420976e459ef585debfca2ae55d3185528 /src/map/battle.c
parent348044f12d5f683c8945e0eac642f2795050fb4e (diff)
downloadhercules-3e53a34615c2535dbed3d7c2c7a00f1ef3eaff0a.tar.gz
hercules-3e53a34615c2535dbed3d7c2c7a00f1ef3eaff0a.tar.bz2
hercules-3e53a34615c2535dbed3d7c2c7a00f1ef3eaff0a.tar.xz
hercules-3e53a34615c2535dbed3d7c2c7a00f1ef3eaff0a.zip
Another ~10 Fixes
Addressing out of bounds read/write. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 998fad0af..7e7317935 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -303,7 +303,7 @@ int battle_attr_ratio(int atk_elem,int def_type, int def_lv)
if (atk_elem < 0 || atk_elem >= ELE_MAX)
return 100;
- if (def_type < 0 || def_type > ELE_MAX || def_lv < 1 || def_lv > 4)
+ if (def_type < 0 || def_type >= ELE_MAX || def_lv < 1 || def_lv > 4)
return 100;
return battle->attr_fix_table[def_lv-1][atk_elem][def_type];