mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
big: Add randomized testing.
This commit is contained in:
@@ -402,7 +402,7 @@ int_shl :: proc(dest, src: ^Int, bits: int) -> (err: Error) {
|
||||
shift := DIGIT(_DIGIT_BITS - bits);
|
||||
carry := DIGIT(0);
|
||||
|
||||
for x:= 0; x <= dest.used; x+= 1 {
|
||||
for x:= 0; x < dest.used; x+= 1 {
|
||||
fwd_carry := (dest.digit[x] >> shift) & mask;
|
||||
dest.digit[x] = (dest.digit[x] << uint(bits) | carry) & _MASK;
|
||||
carry = fwd_carry;
|
||||
|
||||
Reference in New Issue
Block a user