mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 13:03:05 +01:00
Fix for assert in VS2015 debug builds (and likely others too). ( Expression: vector subscript out of range )
This commit is contained in:
@@ -293,7 +293,7 @@ namespace Forsyth
|
||||
|
||||
assert(vertexData.activeFaceListSize > 0);
|
||||
uint* begin = &activeFaceList[vertexData.activeFaceListStart];
|
||||
uint* end = &activeFaceList[vertexData.activeFaceListStart + vertexData.activeFaceListSize];
|
||||
uint* end = &(activeFaceList[vertexData.activeFaceListStart + vertexData.activeFaceListSize - 1]) + 1;
|
||||
uint* it = std::find(begin, end, bestFace);
|
||||
assert(it != end);
|
||||
std::swap(*it, *(end-1));
|
||||
|
||||
Reference in New Issue
Block a user