From 7f95b3a4739c20f553c8b9ca4dda1c91a09c9dcd Mon Sep 17 00:00:00 2001 From: vatebur Date: Tue, 11 Jun 2024 18:43:33 +0800 Subject: [PATCH] =?UTF-8?q?fix=20mcfish=20bug=EF=BC=9Aout=20of=20range=20(?= =?UTF-8?q?#914)?= 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 c1ca4692a57..ad28ce6b178 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 }