Utility/Algorithm: Fix crash in ComputeAABB

Former-commit-id: 58266814fea559c782e6df1145f82a37baf0427c
This commit is contained in:
Lynix 2016-02-24 17:09:40 +01:00
parent e65d495a98
commit e9bb81e851
1 changed files with 1 additions and 1 deletions

View File

@ -636,7 +636,7 @@ namespace Nz
if (vertexCount > 0) if (vertexCount > 0)
{ {
aabb.Set(positionPtr->x, positionPtr->y, positionPtr->z, 0.f, 0.f, 0.f); aabb.Set(positionPtr->x, positionPtr->y, positionPtr->z, 0.f, 0.f, 0.f);
--positionPtr; ++positionPtr;
for (unsigned int i = 1; i < vertexCount; ++i) for (unsigned int i = 1; i < vertexCount; ++i)
aabb.ExtendTo(*positionPtr++); aabb.ExtendTo(*positionPtr++);