srctree

mlugg parent 03ad8621 3c45a945
Value: fix out-of-bounds slice access writing zero-bit undef value

I have no idea why this wasn't being hit on master before.

inlinesplit
src/Value.zig added: 4, removed: 2, total 2
@@ -469,7 +469,9 @@ pub fn writeToPackedMemory(
const endian = target.cpu.arch.endian();
if (val.isUndef(mod)) {
const bit_size: usize = @intCast(ty.bitSize(mod));
std.mem.writeVarPackedInt(buffer, bit_offset, bit_size, @as(u1, 0), endian);
if (bit_size != 0) {
std.mem.writeVarPackedInt(buffer, bit_offset, bit_size, @as(u1, 0), endian);
}
return;
}
switch (ty.zigTypeTag(mod)) {