From 18eb369de8947d26ff3c0666bf6a6ba9786780a8 Mon Sep 17 00:00:00 2001 From: awalol Date: Tue, 13 Feb 2024 01:17:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20shuffixBuf=20=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- algo/qmc/qmc.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/algo/qmc/qmc.go b/algo/qmc/qmc.go index 1f6843a..f991127 100644 --- a/algo/qmc/qmc.go +++ b/algo/qmc/qmc.go @@ -140,12 +140,12 @@ func (d *Decoder) searchKey() (err error) { return err } - switch string(bytes.ReplaceAll(suffixBuf, []byte{0x00}, []byte{})) { + switch string(suffixBuf) { case "QTag": return d.readRawMetaQTag() case "STag": return errors.New("qmc: file with 'STag' suffix doesn't contains media key") - case "cex": + case "cex\x00": d.decodedKey, err = readKeyFromMMKVCustom(d) if err == nil { suffix := []byte{0x63, 0x65, 0x78, 0x00} // cex @@ -164,6 +164,7 @@ func (d *Decoder) searchKey() (err error) { return nil } } + } return err default: