From 8e5d24fedfc371e5d862aa09747a3aee69beffa5 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 24 Jun 2019 18:23:13 +0200 Subject: [PATCH] zink: fix off-by-one in assert Acked-by: Jordan Justen --- src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2