From 7cf39101f0184bf42bd3427ac5497dca20b3e116 Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Mon, 31 Mar 2025 02:43:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=20ssPlusN=20=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E4=B8=AD=E7=9A=84=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=EF=BC=8C=E7=A1=AE=E4=BF=9D=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=AD=A3=E6=95=B4=E6=95=B0=E4=BB=A5=E6=8F=90?= =?UTF-8?q?=E9=AB=98=E8=BE=93=E5=85=A5=E5=87=86=E7=A1=AE=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/scoresaber/score.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handler/scoresaber/score.go b/handler/scoresaber/score.go index f0f61de..eb066f7 100644 --- a/handler/scoresaber/score.go +++ b/handler/scoresaber/score.go @@ -42,9 +42,9 @@ func ssPlusN(msg model.Message) (reply model.Reply) { var N int if len(msg.RawMsg) > len("ss+") { N, err = strconv.Atoi(msg.RawMsg[len("ss+"):]) - if err != nil { + if err != nil || N <= 0 { return model.Reply{ - ReplyMsg: "请输入一个整数", + ReplyMsg: "请输入一个正整数", ReferOriginMsg: true, FromMsg: msg, }