Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Dec 27, 2023

Conversation

VadimKulagin
Copy link
Contributor

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.

This is necessary to match the description of 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.
@mwoss
Copy link
Member

mwoss commented Dec 27, 2023

Thanks for your contribution, that's a great catch! I also apologize for my late response. I wasn't working on this lib for some time, there's a lot of new issues that need to be fixed :D

@mwoss mwoss merged commit 6926256 into shopspring:master Dec 27, 2023
@mwoss
Copy link
Member

mwoss commented Dec 27, 2023

This PR closes #327. Thanks again @VadimKulgin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants