Fixed: a memory corrupt in DetourCrowd
This commit is contained in:
parent
65b844170f
commit
dc5f95eafa
@ -262,7 +262,7 @@ void dtObstacleAvoidanceQuery::addCircle(const float* pos, const float rad,
|
||||
|
||||
void dtObstacleAvoidanceQuery::addSegment(const float* p, const float* q)
|
||||
{
|
||||
if (m_nsegments > m_maxSegments)
|
||||
if (m_nsegments >= m_maxSegments)
|
||||
return;
|
||||
|
||||
dtObstacleSegment* seg = &m_segments[m_nsegments++];
|
||||
|
Loading…
x
Reference in New Issue
Block a user