From 726ae20f752df871faa7fd19378ff486d09f3497 Mon Sep 17 00:00:00 2001 From: bjdgyc Date: Thu, 4 Jul 2024 16:26:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E5=AD=97=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/dbdata/group.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/dbdata/group.go b/server/dbdata/group.go index 81a48cdc..b4f3bfae 100644 --- a/server/dbdata/group.go +++ b/server/dbdata/group.go @@ -181,11 +181,13 @@ func SetGroup(g *Group) error { } if regexp.MustCompile(`^\d{1,5}-\d{1,5}$`).MatchString(p) { rp := strings.Split(p, "-") - portfrom, err := strconv.Atoi(rp[0]) + // portfrom, err := strconv.Atoi(rp[0]) + portfrom, err := strconv.ParseUint(rp[0], 10, 16) if err != nil { return errors.New("端口:" + rp[0] + " 格式错误, " + err.Error()) } - portto, err := strconv.Atoi(rp[1]) + // portto, err := strconv.Atoi(rp[1]) + portto, err := strconv.ParseUint(rp[1], 10, 16) if err != nil { return errors.New("端口:" + rp[1] + " 格式错误, " + err.Error()) } @@ -194,7 +196,7 @@ func SetGroup(g *Group) error { } } else { - port, err := strconv.Atoi(p) + port, err := strconv.ParseUint(p, 10, 16) if err != nil { return errors.New("端口:" + p + " 格式错误, " + err.Error()) }