From 59029a6c7a0365521aa80519081fdfc7d958cca0 Mon Sep 17 00:00:00 2001 From: markzd Date: Sat, 5 Jan 2013 04:45:53 +0000 Subject: * 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 --- src/map/unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/unit.c') 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; -- cgit v1.2.3-70-g09d2