Skip to content

Commit

Permalink
- fixed bad sector validation in DoUpdateSector.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Aug 6, 2022
1 parent 738c133 commit fddb4d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/core/updatesector.h
Expand Up @@ -42,7 +42,7 @@ void DoUpdateSector(double x, double y, double z, int* sectnum, double maxDistan
{
double maxDistSq = maxDistance * maxDistance;

if (sectnum)
if (validSectorIndex(sectnum))
{
if (checker(x, y, z, &sector[*sectnum]))
return;
Expand All @@ -66,8 +66,8 @@ void DoUpdateSector(double x, double y, double z, int* sectnum, double maxDistan
}
iter++;
}
*sectnum = -1;
}
*sectnum = -1;
}

template<class Inside>
Expand Down

0 comments on commit fddb4d2

Please sign in to comment.