fix:修复猜单词插件最后一轮无法正常发送的错误 (#1039)

This commit is contained in:
Image 2024-10-16 18:44:58 +08:00 committed by GitHub
parent e653475e08
commit 321c941ce5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}
}