summaryrefslogtreecommitdiff
path: root/danmaku
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-07-29 14:29:00 +0800
committerKeuin <[email protected]>2023-07-29 20:16:16 +0800
commit727f1399a91648f9bb2bab400962ed99a1962bda (patch)
tree41279b8d54b9c9b641cb26939cb59d63eac6769e /danmaku
parent206796c05dd9054e43b12928e62e7379e882df94 (diff)
Bugfix: failed to parse `DANMU_MSG` messages
Diffstat (limited to 'danmaku')
-rw-r--r--danmaku/dmmsg/danmu.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/danmaku/dmmsg/danmu.go b/danmaku/dmmsg/danmu.go
index f0229d2..a18a9aa 100644
--- a/danmaku/dmmsg/danmu.go
+++ b/danmaku/dmmsg/danmu.go
@@ -26,8 +26,8 @@ func (dm DanMuMessage) String() string {
const InvalidDanmakuJson = "invalid danmaku JSON document"
func ParseDanmakuMessage(body RawDanMuMessage) (dmm DanMuMessage, err error) {
- if len(body.Info) != 16 {
- err = fmt.Errorf("%s: \"info\" length != 16", InvalidDanmakuJson)
+ if len(body.Info) < 16 {
+ err = fmt.Errorf("%s: \"info\" length < 16", InvalidDanmakuJson)
return
}