diff --git a/sm2/util.go b/sm2/util.go index 927ec44..c52b917 100644 --- a/sm2/util.go +++ b/sm2/util.go @@ -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 }