mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 12:48:14 +00:00
big_int addition overflow rules
This commit is contained in:
+1
-1
@@ -532,7 +532,7 @@ void big_int_add(BigInt *dst, BigInt const *x, BigInt const *y) {
|
|||||||
overflow += 1;
|
overflow += 1;
|
||||||
} else {
|
} else {
|
||||||
// IMPORTANT TODO(bill): Is this mathematics correct here?
|
// IMPORTANT TODO(bill): Is this mathematics correct here?
|
||||||
v += prev_overflow;
|
v += overflow;
|
||||||
}
|
}
|
||||||
dst->d.words[i] = v;
|
dst->d.words[i] = v;
|
||||||
i += 1;
|
i += 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user