Sema: fix not reserving enough memory for comptime shl

This commit is contained in:
Andrew Kelley
2022-04-18 06:54:46 -07:00
parent c9858f833c
commit edb4a07d4d

View File

@@ -3987,7 +3987,7 @@ pub const Value = extern union {
const shift = @intCast(usize, rhs.toUnsignedInt(target));
const limbs = try arena.alloc(
std.math.big.Limb,
std.math.big.int.calcTwosCompLimbCount(info.bits),
std.math.big.int.calcTwosCompLimbCount(info.bits) + 1,
);
var result_bigint = BigIntMutable{
.limbs = limbs,