decimal icon indicating copy to clipboard operation
decimal copied to clipboard

Allocate new(big.Int) in Copy method to deeply clone it

Open VadimKulagin opened this issue 2 years ago • 0 comments

This is necessary to match the description of big.Int: https://pkg.go.dev/math/big#Int

  To "copy" an Int value,
  an existing (or newly allocated) Int must be set to
  a new value using the Int.Set method; shallow copies
  of Ints are not supported and may lead to errors.

VadimKulagin avatar Mar 26 '22 14:03 VadimKulagin