diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-11-27 12:43:24 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-11-27 12:43:24 +0100 |
| commit | f79efd43e44ae74bfae098d49bf9c5b2876eda5d (patch) | |
| tree | 874883449375026d538ef2b04586513e14c7ce82 /core/math | |
| parent | e8e350144374957cb96d4a38411deba434c93a1d (diff) | |
Fix missing clamp in core:math/big random.
Diffstat (limited to 'core/math')
| -rw-r--r-- | core/math/big/internal.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/big/internal.odin b/core/math/big/internal.odin index 968a26f8f..ca8dbf4c5 100644 --- a/core/math/big/internal.odin +++ b/core/math/big/internal.odin @@ -2856,7 +2856,7 @@ internal_int_random :: proc(dest: ^Int, bits: int, r: ^rnd.Rand = nil, allocator dest.digit[digits - 1] &= ((1 << uint(bits)) - 1) } dest.used = digits - return nil + return internal_clamp(dest) } internal_random :: proc { internal_int_random, } |