From 3ee7dd03701bc7b1b59181acd6c3e6e075b0758c Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Thu, 20 Apr 2023 23:34:06 -0500 Subject: [PATCH] fix: ensure that rhs of shifts are generic mistakenly left an @intCast that implied a u5 (which only works when Digest == u32) --- src/trie.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trie.zig b/src/trie.zig index 99707d3..baea3fd 100644 --- a/src/trie.zig +++ b/src/trie.zig @@ -121,7 +121,7 @@ pub fn HashArrayMappedTrie(comptime K: type, comptime V: type, comptime Context: var i: Log2Int(Digest) = 0; for (0..table_size) |shift| { - const mask_loop = @as(Digest, 1) << @intCast(u5, shift); + const mask_loop = @as(Digest, 1) << @intCast(Log2Int(Digest), shift); if (new_map & mask_loop != 0) { defer i += 1;