Check serialised shader tool enums against known list

* Prevents an out of bound error from corrupt configs (or configs from the
  future!)
This commit is contained in:
baldurk
2026-05-15 12:44:09 +01:00
parent 2e50599d26
commit 206d732ade
@@ -515,7 +515,7 @@ bool PersistantConfig::Load(const rdcstr &filename)
for(const ShaderProcessingTool &dis : ShaderProcessors)
{
// if it's declared
if(dis.tool != KnownShaderTool::Unknown)
if(dis.tool != KnownShaderTool::Unknown && dis.tool < KnownShaderTool::Count)
tools[(size_t)dis.tool] = true;
}