From: Erik Faye-Lund Date: Mon, 24 Jun 2019 16:23:13 +0000 (+0200) Subject: zink: fix off-by-one in assert X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e5d24fedfc371e5d862aa09747a3aee69beffa5;p=mesa.git zink: fix off-by-one in assert Acked-by: Jordan Justen --- diff --git a/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c b/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c index 8028b7a6d70..32c4bdc73ca 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c +++ b/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c @@ -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;