From 846fab02dcf78af9d550717195df7909cfdfd448 Mon Sep 17 00:00:00 2001 From: rtw1x1 Date: Wed, 31 Dec 2025 10:10:11 +0000 Subject: [PATCH] fix: CheckMeshIndex bounds check to use actual mesh count --- src/EterGrnLib/Model.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EterGrnLib/Model.cpp b/src/EterGrnLib/Model.cpp index 968f838..6f9fa18 100644 --- a/src/EterGrnLib/Model.cpp +++ b/src/EterGrnLib/Model.cpp @@ -257,7 +257,7 @@ BOOL CGrannyModel::CheckMeshIndex(int iIndex) const { if (iIndex < 0) return FALSE; - if (iIndex >= m_meshNodeSize) + if (iIndex >= GetMeshCount()) return FALSE; return TRUE;