zink: fix off-by-one in assert

Acked-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Erik Faye-Lund 2019-06-24 18:23:13 +02:00
parent 35c0ef8852
commit 8e5d24fedf
1 changed files with 1 additions and 1 deletions

View File

@ -650,7 +650,7 @@ get_type_def(struct spirv_builder *b, SpvOp op, const uint32_t args[],
*/
struct spirv_type key;
assert(num_args < ARRAY_SIZE(key.args));
assert(num_args <= ARRAY_SIZE(key.args));
key.op = op;
memcpy(&key.args, args, sizeof(uint32_t) * num_args);
key.num_args = num_args;