summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-23 18:54:09 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-23 18:54:09 +0000
commitac46c901463f925504b6a3872a21e64605e3db10 (patch)
tree4b7d5b9db8f19ee6d416a1524ecafb0d65744807 /src/map/mob.c
parent300facbcd059becdc8addac8a2f392452fea5fa0 (diff)
downloadhercules-ac46c901463f925504b6a3872a21e64605e3db10.tar.gz
hercules-ac46c901463f925504b6a3872a21e64605e3db10.tar.bz2
hercules-ac46c901463f925504b6a3872a21e64605e3db10.tar.xz
hercules-ac46c901463f925504b6a3872a21e64605e3db10.zip
memory bugs fixed
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1278 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index d4d0fd45d..cae0eddf3 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -815,8 +815,12 @@ static int mob_walktoxy_sub(struct mob_data *md)
nullpo_retr(0, md);
+ memset(&wpd, 0, sizeof(wpd));
+
if(path_search(&wpd,md->bl.m,md->bl.x,md->bl.y,md->to_x,md->to_y,md->state.walk_easy))
return 1;
+ if (wpd.path[0] >= 8)
+ return 1;
x = md->bl.x+dirx[wpd.path[0]];
y = md->bl.y+diry[wpd.path[0]];
if (map_getcell(md->bl.m,x,y,CELL_CHKBASILICA) && !(status_get_mode(&md->bl)&0x20)) {