d3dcompiler_43: Fixed small overread possibility (Coverity).
This commit is contained in:
parent
45473a65a0
commit
1f1686fddd
|
@ -1058,10 +1058,8 @@ static const char *debug_node_type(enum hlsl_ir_node_type type)
|
|||
"HLSL_IR_FUNCTION_DECL",
|
||||
};
|
||||
|
||||
if (type > sizeof(names) / sizeof(names[0]))
|
||||
{
|
||||
if (type >= sizeof(names) / sizeof(names[0]))
|
||||
return "Unexpected node type";
|
||||
}
|
||||
return names[type];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue