From 046632995dd8d62f122af61c109d514d423f49d0 Mon Sep 17 00:00:00 2001 From: imagemlt Date: Wed, 16 Oct 2024 13:48:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=8C=9C=E5=8D=95?= =?UTF-8?q?=E8=AF=8D=E6=8F=92=E4=BB=B6=E6=9C=80=E5=90=8E=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E5=8F=91=E9=80=81=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/wordle/wordle.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/wordle/wordle.go b/plugin/wordle/wordle.go index 3a3615846f..491f27dee4 100644 --- a/plugin/wordle/wordle.go +++ b/plugin/wordle/wordle.go @@ -235,10 +235,6 @@ func newWordleGame(target string) func(string) (bool, []byte, error) { } } record = append(record, s) - if len(record) >= cap(record) { - err = errTimesRunOut - return - } } var side = 20 var space = 10 @@ -269,6 +265,10 @@ func newWordleGame(target string) func(string) (bool, []byte, error) { } } data, err = imgfactory.ToBytes(ctx.Image()) + if len(record) >= cap(record) { + err = errTimesRunOut + return + } return } }