Skip to content

Commit

Permalink
Update secp256.go
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyAkhunov authored Nov 4, 2021
1 parent 52ae753 commit eb6793c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion secp256.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func RecoverPubkeyWithContext(context *Context, msg []byte, sig []byte, pkbuf []

var pubkey []byte
if total := len(pkbuf) + 65; cap(pkbuf) >= total {
pubkey = pkbuf[:65] // Reuse the space in pkbuf, is it has enough capacity
pubkey = pkbuf[:total] // Reuse the space in pkbuf, is it has enough capacity
} else {
pubkey = make([]byte, total)
copy(pubkey, pkbuf)
Expand Down

0 comments on commit eb6793c

Please sign in to comment.