summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authormarkzd <markzd@54d463be-8e91-2dee-dedb-b68131a5f0ec>2013-01-05 04:45:53 +0000
committermarkzd <markzd@54d463be-8e91-2dee-dedb-b68131a5f0ec>2013-01-05 04:45:53 +0000
commit59029a6c7a0365521aa80519081fdfc7d958cca0 (patch)
treee096f8d20d0bbb2bcae2fa93de15d5cf4da8196a /src/map/unit.c
parent39b04a578b2a74f9e48b0eb2583c249f98c9404d (diff)
downloadhercules-59029a6c7a0365521aa80519081fdfc7d958cca0.tar.gz
hercules-59029a6c7a0365521aa80519081fdfc7d958cca0.tar.bz2
hercules-59029a6c7a0365521aa80519081fdfc7d958cca0.tar.xz
hercules-59029a6c7a0365521aa80519081fdfc7d958cca0.zip
* Follow up r17065
1. Removed some unnecessary checks.(bugreport:7078) 2. Fixed some index's which would access an invalid array position, crashing the server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17077 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index eb8eac589..111f49065 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1687,7 +1687,7 @@ int unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir)
struct unit_data *ud = unit_bl2ud(bl);
nullpo_ret(ud);
- if( dir < 0 || dir > 7 )
+ if(dir > 7)
return 1;
ud->to_x = tx;