[IclipMap_t] Fix incorrect plane check
This commit is contained in:
parent
d47cc138d5
commit
649605551d
@ -681,7 +681,7 @@ namespace Assets
|
||||
for (int i = 0; i < clipMap->numCBrushSides; ++i)
|
||||
{
|
||||
int planeIndex = reader.read<int>();
|
||||
if (planeIndex < 0 || planeIndex > clipMap->numCBrushSides)
|
||||
if (planeIndex < 0 || planeIndex >= clipMap->numCPlanes)
|
||||
{
|
||||
Components::Logger::Error("invalid plane index");
|
||||
return;
|
||||
@ -704,7 +704,7 @@ namespace Assets
|
||||
for (int i = 0; i < clipMap->numCNodes; ++i)
|
||||
{
|
||||
int planeIndex = reader.read<int>();
|
||||
if (planeIndex < 0 || planeIndex > clipMap->numCPlanes)
|
||||
if (planeIndex < 0 || planeIndex >= clipMap->numCPlanes)
|
||||
{
|
||||
Components::Logger::Error("invalid plane index\n");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user