diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-07-29 17:29:32 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-08-11 20:59:52 +0200 |
| commit | c1a001c331b47e3f49241896deb48c2130b4abbb (patch) | |
| tree | 2f843d5cd79a0bf392352a4aa29e12262e38b3b0 /core/math/big/logical.odin | |
| parent | 13fab366394c4c1bd4f1e8eb2eefea81208764a6 (diff) | |
big: Add randomized testing.
Diffstat (limited to 'core/math/big/logical.odin')
| -rw-r--r-- | core/math/big/logical.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/big/logical.odin b/core/math/big/logical.odin index 9b6654a5c..1d2ba0895 100644 --- a/core/math/big/logical.odin +++ b/core/math/big/logical.odin @@ -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; |