Skip to content

Commit 9fc133a

Browse files
committed
Fixes cache bug
1 parent 1b57858 commit 9fc133a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Zcu.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2748,7 +2748,7 @@ pub fn saveZoirCache(cache_file: std.fs.File, stat: std.fs.File.Stat, zoir: Zoir
27482748
},
27492749
.{
27502750
.base = @ptrCast(zoir.limbs),
2751-
.len = zoir.limbs.len * 4,
2751+
.len = zoir.limbs.len * @sizeOf(std.math.big.Limb),
27522752
},
27532753
.{
27542754
.base = zoir.string_bytes.ptr,

src/Zcu/PerThread.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ pub fn updateFile(
234234
error.FileTooBig => unreachable, // 0 is not too big
235235
else => |e| return e,
236236
};
237+
try cache_file.seekTo(0);
237238

238239
if (stat.size > std.math.maxInt(u32))
239240
return error.FileTooBig;

0 commit comments

Comments
 (0)