From f217bd4b5fadee83b239d1e0124fd0c2d90e0fbb Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 26 Jan 2022 19:42:09 +0100 Subject: [PATCH] Update HMPLoader.cpp --- code/AssetLib/HMP/HMPLoader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/AssetLib/HMP/HMPLoader.cpp b/code/AssetLib/HMP/HMPLoader.cpp index c148e6667..1625cb359 100644 --- a/code/AssetLib/HMP/HMPLoader.cpp +++ b/code/AssetLib/HMP/HMPLoader.cpp @@ -385,7 +385,10 @@ void HMPImporter::CreateOutputFaceList(unsigned int width, unsigned int height) for (unsigned int x = 0; x < width - 1; ++x, ++pcFaceOut) { pcFaceOut->mNumIndices = 4; pcFaceOut->mIndices = new unsigned int[4]; - if ((offset + x + 1) >= upperBound){ + if ((offset0 + x + 1) >= upperBound){ + continue; + } + if ((offset1 + x + 1) >= upperBound){ continue; }