summaryrefslogtreecommitdiffhomepage
path: root/digital/io-hub/src/common-cc/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io-hub/src/common-cc/path.cc')
-rw-r--r--digital/io-hub/src/common-cc/path.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/digital/io-hub/src/common-cc/path.cc b/digital/io-hub/src/common-cc/path.cc
index bb025405..151eedd0 100644
--- a/digital/io-hub/src/common-cc/path.cc
+++ b/digital/io-hub/src/common-cc/path.cc
@@ -195,6 +195,7 @@ void Path::add_obstacle( const vect_t &c,
int Path::find_neighbors(int cur_point, struct astar_neighbor_t *neighbors)
{
int neighbors_nb = 0;
+ ucoo::assert(cur_point<navpoints_nb && neighbors!=NULL);
/* Parse all nodes */
for(int i=0; i<navpoints_nb; i++)
@@ -337,6 +338,7 @@ bool Path::get_next(vect_t &p)
{
if (path_found)
{
+ ucoo::assert(next_node<PATH_NAVPOINTS_NB);
p = navpoints[next_node];
next_node = astar_nodes[next_node].prev;
}
@@ -345,7 +347,7 @@ bool Path::get_next(vect_t &p)
vect_t& Path::get_point_vect(const int index)
{
- //assert(index<navpoints_nb);
+ ucoo::assert(index<navpoints_nb);
return navpoints[index];
}