Commit edb4a07d4d

Andrew Kelley <andrew@ziglang.org>
2022-04-18 15:54:46
Sema: fix not reserving enough memory for comptime shl
1 parent c9858f8
Changed files (1)
src/value.zig
@@ -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,