Skip to content

Commit 321c941

Browse files
authored
fix:修复猜单词插件最后一轮无法正常发送的错误 (#1039)
1 parent e653475 commit 321c941

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugin/wordle/wordle.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,6 @@ func newWordleGame(target string) func(string) (bool, []byte, error) {
235235
}
236236
}
237237
record = append(record, s)
238-
if len(record) >= cap(record) {
239-
err = errTimesRunOut
240-
return
241-
}
242238
}
243239
var side = 20
244240
var space = 10
@@ -269,6 +265,10 @@ func newWordleGame(target string) func(string) (bool, []byte, error) {
269265
}
270266
}
271267
data, err = imgfactory.ToBytes(ctx.Image())
268+
if len(record) >= cap(record) {
269+
err = errTimesRunOut
270+
return
271+
}
272272
return
273273
}
274274
}

0 commit comments

Comments
 (0)