Skip to content

Commit bc0bb4c

Browse files
committed
- fix FindModelIndexByName lookup
1 parent be3c65d commit bc0bb4c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

DriverLevelTool/driver_routines/models.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ ModelRef_t* CDriverLevelModels::GetModelByIndex(int nIndex) const
5858

5959
int CDriverLevelModels::FindModelIndexByName(const char* name) const
6060
{
61-
for (int i = 0; i < MAX_MODELS; i++)
61+
for (int i = 0; i < MAX_MODELS && i < m_model_names.size(); i++)
6262
{
6363
if (!stricmp(m_model_names[i], name))
6464
return i;

0 commit comments

Comments
 (0)