Skip to content

Commit

Permalink
修复了 QMCv2.from_file() 的 master_key 参数优先级不是最高的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
nukemiko committed Nov 22, 2022
1 parent bd16178 commit 4aef0f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libtakiyasha/qmc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def operation(fileobj: IO[bytes]) -> QMCv2:
fileobj.seek(0, 0)
initial_bytes = fileobj.read(audio_encrypted_len)
else:
if simple_key is None:
if simple_key is None and master_key is None:
raise ValueError("'simple_key' is required for QMCv2 file master key decryption")
if tail_data == b'QTag':
fileobj.seek(-8, 2)
Expand Down

0 comments on commit 4aef0f7

Please sign in to comment.