From 649605551d4148d04b711b63cedff78f55f0ce2e Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sat, 18 Mar 2017 15:19:31 +0100 Subject: [PATCH] [IclipMap_t] Fix incorrect plane check --- src/Components/Modules/AssetInterfaces/IclipMap_t.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/AssetInterfaces/IclipMap_t.cpp b/src/Components/Modules/AssetInterfaces/IclipMap_t.cpp index 7ed8b91c..6ea5ee9c 100644 --- a/src/Components/Modules/AssetInterfaces/IclipMap_t.cpp +++ b/src/Components/Modules/AssetInterfaces/IclipMap_t.cpp @@ -681,7 +681,7 @@ namespace Assets for (int i = 0; i < clipMap->numCBrushSides; ++i) { int planeIndex = reader.read(); - 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(); - if (planeIndex < 0 || planeIndex > clipMap->numCPlanes) + if (planeIndex < 0 || planeIndex >= clipMap->numCPlanes) { Components::Logger::Error("invalid plane index\n"); return;