diff --git a/sm2/sm2.go b/sm2/sm2.go index c3ad1ed..8d2c2e6 100644 --- a/sm2/sm2.go +++ b/sm2/sm2.go @@ -117,7 +117,7 @@ func (mode pointMarshalMode) mashal(curve elliptic.Curve, x, y *big.Int) []byte 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 }