mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
bigint: use a stack local here to prevent aliasing issues
This commit is contained in:
parent
1db6018140
commit
b15e205438
@ -316,7 +316,9 @@ pub const Mutable = struct {
|
||||
}
|
||||
|
||||
if (a.limbs.len == 1 and b.limbs.len == 1 and a.positive == b.positive) {
|
||||
if (!@addWithOverflow(Limb, a.limbs[0], b.limbs[0], &r.limbs[0])) {
|
||||
var o: Limb = undefined;
|
||||
if (!@addWithOverflow(Limb, a.limbs[0], b.limbs[0], &o)) {
|
||||
r.limbs[0] = o;
|
||||
r.len = 1;
|
||||
r.positive = a.positive;
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user