diff options
author | shennetsind <ind@henn.et> | 2015-01-17 18:49:03 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2015-01-17 18:49:03 -0200 |
commit | 3e53a34615c2535dbed3d7c2c7a00f1ef3eaff0a (patch) | |
tree | 2f646d420976e459ef585debfca2ae55d3185528 /src/map/itemdb.c | |
parent | 348044f12d5f683c8945e0eac642f2795050fb4e (diff) | |
download | hercules-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/itemdb.c')
-rw-r--r-- | src/map/itemdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 8b6dfba63..b537d69be 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -2242,7 +2242,7 @@ void itemdb_reload(void) { if (k == MAX_SEARCH) continue; - if (id->mob[k].id != i) + if (id->mob[k].id != i && k != MAX_SEARCH - 1) memmove(&id->mob[k+1], &id->mob[k], (MAX_SEARCH-k-1)*sizeof(id->mob[0])); id->mob[k].chance = entry->dropitem[d].p; id->mob[k].id = i; |