* Wrong number, out of array bounds

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
This commit is contained in:
Cydh Ramdh 2015-01-07 17:13:17 +07:00
parent 8897ad72ac
commit 9021cb6349

View File

@ -2335,9 +2335,9 @@ bool unit_can_reach_bl(struct block_list *bl,struct block_list *tbl, int range,
if (map_getcell(tbl->m,tbl->x-dx,tbl->y-dy,CELL_CHKNOPASS)) { // Look for a suitable cell to place in.
int i;
for(i = 0; i < 9 && map_getcell(tbl->m,tbl->x-dirx[i],tbl->y-diry[i],CELL_CHKNOPASS); i++);
for(i = 0; i < 8 && map_getcell(tbl->m,tbl->x-dirx[i],tbl->y-diry[i],CELL_CHKNOPASS); i++);
if (i == 9)
if (i == 8)
return false; // No valid cells.
dx = dirx[i];