From c5982357d38de50548162a60718c4a66d96d63b2 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Wed, 18 May 2022 15:43:08 +0800 Subject: [PATCH] avoid slice again --- sm2/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }