d3dcompiler_43: Fixed small overread possibility (Coverity).

This commit is contained in:
Marcus Meissner 2012-07-07 11:51:45 +02:00 committed by Alexandre Julliard
parent 45473a65a0
commit 1f1686fddd
1 changed files with 1 additions and 3 deletions

View File

@ -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];
}