From d8400bcc065367779f67740bc59aac976bd5eda1 Mon Sep 17 00:00:00 2001 From: Dastgir Date: Tue, 20 Jan 2015 16:39:23 +0530 Subject: Fixes Compile Error on Windows --- src/map/unit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/map') diff --git a/src/map/unit.c b/src/map/unit.c index a1c739af3..27b96c55b 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -116,8 +116,9 @@ int unit_walktoxy_sub(struct block_list *bl) //Trim the last part of the path to account for range, //but always move at least one cell when requested to move. for (i = (ud->chaserange*10)-10; i > 0 && ud->walkpath.path_len>1;) { + uint8 dir; ud->walkpath.path_len--; - uint8 dir = ud->walkpath.path[ud->walkpath.path_len]; + dir = ud->walkpath.path[ud->walkpath.path_len]; if (dir&1) i -= MOVE_COST*20; //When chasing, units will target a diamond-shaped area in range [Playtester] else -- cgit v1.2.3-70-g09d2