From 81e255eb3ab54fcb03f06b39a370eeada2b9fdf7 Mon Sep 17 00:00:00 2001 From: vatebur <67186678+vatebur@users.noreply.github.com> Date: Tue, 11 Jun 2024 20:52:37 +0800 Subject: [PATCH] =?UTF-8?q?(fix=20#914)=20mcfish=20bug=EF=BC=9Aout=20of=20?= =?UTF-8?q?range=20(#923)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 mcfish 数组越界问题 --- plugin/mcfish/pole.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/mcfish/pole.go b/plugin/mcfish/pole.go index c1ca4692a5..ad28ce6b17 100644 --- a/plugin/mcfish/pole.go +++ b/plugin/mcfish/pole.go @@ -431,7 +431,7 @@ func init() { ctx.SendChain(message.At(ctx.Event.UserID), message.Text("[0]请输入正确的序号\n", list)) continue } - if first > max || second > max || third > max { + if first >= max || second >= max || third >= max { ctx.SendChain(message.At(ctx.Event.UserID), message.Text("[", max, "]请输入正确的序号\n", list)) continue }