From 2c5b63d4b89b25a323444f6629e6d7c9e9d17300 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 14 Mar 2024 22:07:15 +0300 Subject: [PATCH] Add an extra element for semi-perfect hash --- gen_ir_fold_hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gen_ir_fold_hash.c b/gen_ir_fold_hash.c index efd656f5..53571409 100644 --- a/gen_ir_fold_hash.c +++ b/gen_ir_fold_hash.c @@ -25,10 +25,11 @@ void print_hash(uint32_t *mask, uint32_t count) { uint32_t i; - printf("static const uint32_t _ir_fold_hash[%d] = {\n", count); + printf("static const uint32_t _ir_fold_hash[%d] = {\n", count + 1); for (i = 0; i < count; i++) { printf("\t0x%08x,\n", mask[i]); } + printf("\t0x%08x\n", 0); printf("};\n\n"); }