diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-25 01:40:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-25 01:41:48 +0300 |
commit | 98da34f0c6785a4227efa0f6718a7453e2991202 (patch) | |
tree | edef59249a8624820d887f33e9bb9cd829b74a51 /src/map | |
parent | 4625d66090a0954cb7904bddc96bd537b5ecee0a (diff) | |
download | hercules-98da34f0c6785a4227efa0f6718a7453e2991202.tar.gz hercules-98da34f0c6785a4227efa0f6718a7453e2991202.tar.bz2 hercules-98da34f0c6785a4227efa0f6718a7453e2991202.tar.xz hercules-98da34f0c6785a4227efa0f6718a7453e2991202.zip |
Fix assert checks from commit e28a19cfff1f26457d6a0f6192d6782c8db7d3d2.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/path.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/path.c b/src/map/path.c index 379532681..f5e08d4df 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -89,7 +89,7 @@ int path_blownpos(struct block_list *bl, int16 m,int16 x0,int16 y0,int16 dx,int1 { struct map_data *md; - Assert_retr(-1, m < 0 || m >= map->count); + Assert_retr(-1, m >= 0 && m < map->count); if( !map->list[m].cell ) return -1; md = &map->list[m]; @@ -127,7 +127,7 @@ bool path_search_long(struct shootpath_data *spd,struct block_list *bl,int16 m,i struct map_data *md; struct shootpath_data s_spd; - Assert_retr(false, m < 0 || m >= map->count); + Assert_retr(false, m >= 0 && m < map->count); if( spd == NULL ) spd = &s_spd; // use dummy output variable @@ -261,7 +261,7 @@ bool path_search(struct walkpath_data *wpd, struct block_list *bl, int16 m, int1 struct map_data *md; struct walkpath_data s_wpd; - Assert_retr(false, m < 0 || m >= map->count); + Assert_retr(false, m >= 0 && m < map->count); if (wpd == NULL) wpd = &s_wpd; // use dummy output variable |