avoid slice again

This commit is contained in:
Sun Yimin 2022-05-18 15:43:08 +08:00 committed by GitHub
parent 01063b1ff7
commit c5982357d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ import (
func toBytes(curve elliptic.Curve, value *big.Int) []byte {
byteLen := (curve.Params().BitSize + 7) >> 3
result := make([]byte, byteLen)
value.FillBytes(result[:])
value.FillBytes(result)
return result
}