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:
parent
520e617d8a
commit
37ac4414b9
1 changed files with 1 additions and 0 deletions
|
@ -447,6 +447,7 @@ static void find_routes(
|
||||||
for (int x = xmin; x <= xmax; ++x) {
|
for (int x = xmin; x <= xmax; ++x) {
|
||||||
for (int y = ymin; y <= ymax; ++y)
|
for (int y = ymin; y <= ymax; ++y)
|
||||||
{
|
{
|
||||||
|
assert(index(x, y) >= 0);
|
||||||
const findroute_node &n = nodes[index(x,y)];
|
const findroute_node &n = nodes[index(x,y)];
|
||||||
if ( n.search_num == search_counter ) {
|
if ( n.search_num == search_counter ) {
|
||||||
paths::step s =
|
paths::step s =
|
||||||
|
|
Loading…
Add table
Reference in a new issue