From 7ebaca33c87c77af4bee6fbe74e710a0279e1c77 Mon Sep 17 00:00:00 2001 From: Lance Date: Mon, 1 May 2006 02:01:06 +0000 Subject: * Fixed dangling pointer in pc_steal_item (missing lines) causing crash. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6421 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 1 + src/map/pc.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index a11787a80..ca06d4b86 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/04/30 + * Fixed dangling pointer in pc_steal_item (missing lines) causing crash. [Lance] * Fixed lack of initialization in chrif_authreq causing crashes in chrif_authok. [Lance] * Fixed a logic error that was likely the cause of pet loot drops not working. [Skotlex] diff --git a/src/map/pc.c b/src/map/pc.c index 075ca173a..7d9cee17f 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2926,6 +2926,8 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl) if(!sd || !bl || bl->type != BL_MOB) return 0; + md = (TBL_MOB *)bl; + if(md->state.steal_flag>battle_config.skill_steal_max_tries || status_get_mode(bl)&MD_BOSS || md->master_id || (md->class_>=1324 && md->class_<1364) || // prevent stealing from treasure boxes [Valaris] map[md->bl.m].flag.nomobloot || // check noloot map flag [Lorky] -- cgit v1.2.3-70-g09d2