Quell CID 1380157

Coverity is complaining that the index(x,y) function might return a negative value, indicating that x and/or y were not on the map.

This is impossible.

To quell the warning, use an assert().

Closes CID 1380157
This commit is contained in:
Gregory A Lundberg 2017-10-31 15:05:13 -05:00
parent 520e617d8a
commit 37ac4414b9

View file

@ -447,6 +447,7 @@ static void find_routes(
for (int x = xmin; x <= xmax; ++x) {
for (int y = ymin; y <= ymax; ++y)
{
assert(index(x, y) >= 0);
const findroute_node &n = nodes[index(x,y)];
if ( n.search_num == search_counter ) {
paths::step s =