We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be3c65d commit bc0bb4cCopy full SHA for bc0bb4c
1 file changed
DriverLevelTool/driver_routines/models.cpp
@@ -58,7 +58,7 @@ ModelRef_t* CDriverLevelModels::GetModelByIndex(int nIndex) const
58
59
int CDriverLevelModels::FindModelIndexByName(const char* name) const
60
{
61
- for (int i = 0; i < MAX_MODELS; i++)
+ for (int i = 0; i < MAX_MODELS && i < m_model_names.size(); i++)
62
63
if (!stricmp(m_model_names[i], name))
64
return i;
0 commit comments