summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-15 10:27:05 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-15 10:27:05 +0000
commitc0f2069689110d1df816d52e36d049d4b97a7a22 (patch)
tree79b5d2a9dbaff90eaf32470e1fd586f8c7ad43aa /src/map/map.c
parentf51be442a0990eb5755e10346abaeb94404af2b1 (diff)
downloadhercules-c0f2069689110d1df816d52e36d049d4b97a7a22.tar.gz
hercules-c0f2069689110d1df816d52e36d049d4b97a7a22.tar.bz2
hercules-c0f2069689110d1df816d52e36d049d4b97a7a22.tar.xz
hercules-c0f2069689110d1df816d52e36d049d4b97a7a22.zip
- Fixed a bunch of invalid memory access bugs as reported by Valgrind.
- Updated unit_stop_walking to not move character an extra cell when it is already half-way there unless flag 0x4 is passed. (bugreport:3078) - Fixed the monster MD_CASTSENSOR code not correctly setting the monster's aggressive state. - Corrected a few compiler warnings - Changed a bit the code for SC_BOSSMAPINFO so it is not so hideously ugly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13774 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 3222c5579..7cad8961b 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1459,10 +1459,10 @@ void map_addiddb(struct block_list *bl)
}
else if( bl->type == BL_MOB )
{
- struct mob_data* md = BL_CAST(BL_MOB, bl);
+ TBL_MOB* md = (TBL_MOB*)bl;
idb_put(mobid_db,bl->id,bl);
- if( md && (md->db->status.mode&MD_BOSS) && md->db->mexp > 0 )
+ if( (md->db->status.mode&MD_BOSS) && md->db->mexp > 0 )
idb_put(bossid_db, bl->id, bl);
}