Skip to content

Commit

Permalink
config: initialize bigOrigin in init
Browse files Browse the repository at this point in the history
Oversight. Could cause a crash:

)demo
? 2**32

would crash if it was done first in the ivy invocation.

Fixes #71.
  • Loading branch information
robpike committed Dec 9, 2021
1 parent 2f74c23 commit eb58916
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config/config.go
Expand Up @@ -58,6 +58,7 @@ func (c *Config) init() {
c.errOutput = os.Stderr
c.origin = 1
c.seed = time.Now().UnixNano()
c.bigOrigin = big.NewInt(1)
c.source = rand.NewSource(c.seed)
c.random = rand.New(c.source)
c.maxBits = 1e6
Expand Down

0 comments on commit eb58916

Please sign in to comment.