diff --git a/src/shell.zig b/src/shell.zig index d17c2b3..f951213 100644 --- a/src/shell.zig +++ b/src/shell.zig @@ -36,7 +36,10 @@ pub const ShellReader = struct { pub const ShellWriter = struct { counts: std.StringHashMap(u32), allocator: Allocator, - const KV = struct { shell: []const u8, score: u32 }; + const KV = struct { + shell: []const u8, + score: u64, + }; const ShellSections = struct { index: BoundedArray(ShellIndex, MaxShells), @@ -142,7 +145,7 @@ pub const ShellWriter = struct { if (entry.value_ptr.* == 1) { continue; } - const score = @truncate(u32, entry.key_ptr.*.len) * entry.value_ptr.*; + const score = entry.key_ptr.*.len * entry.value_ptr.*; try deque.add(KV{ .shell = entry.key_ptr.*, .score = score }); }