mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user