diff --git a/DarockBili Watch App/Extension/CodeExt.swift b/DarockBili Watch App/Extension/CodeExt.swift index 677f15009..e6c6ffe98 100644 --- a/DarockBili Watch App/Extension/CodeExt.swift +++ b/DarockBili Watch App/Extension/CodeExt.swift @@ -267,6 +267,7 @@ func bv2av(bvid: String) -> UInt64 { return (tmp & MASK_CODE) ^ XOR_CODE } + enum BuvidFpError: Error { case readError } @@ -298,8 +299,9 @@ struct BuvidFp { let remaining = key.distance(from: index, to: key.endIndex) let read = min(remaining, 16) - withUnsafeMutableBytes(of: &buf) { buffer in - key.copyBytes(to: buffer, from: index..