mirror of
https://github.com/NinjaCheetah/libWiiPy.git
synced 2025-04-26 05:11:02 -04:00
Correctly pack boot2 WADs as type "ib" and not "Is"
This commit is contained in:
parent
338446efcb
commit
a85beac602
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "libWiiPy"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
authors = [
|
||||
{ name="NinjaCheetah", email="ninjacheetah@ncxprogramming.com" },
|
||||
{ name="Lillian Skinner", email="lillian@randommeaninglesscharacters.com" }
|
||||
|
@ -72,8 +72,7 @@ def decrypt_content(content_enc, title_key, content_index, content_length) -> by
|
||||
# Decrypt the content using the AES object.
|
||||
content_dec = aes.decrypt(content_enc)
|
||||
# Trim additional bytes that may have been added so the content is the correct size.
|
||||
while len(content_dec) > content_length:
|
||||
content_dec = content_dec[:-1]
|
||||
content_dec = content_dec[:content_length]
|
||||
return content_dec
|
||||
|
||||
|
||||
|
@ -70,6 +70,9 @@ class Title:
|
||||
wad_data : bytes
|
||||
The raw data of the WAD.
|
||||
"""
|
||||
# Set WAD type to ib if the title being packed is boot2.
|
||||
if self.tmd.title_id == "0000000100000001":
|
||||
self.wad.wad_type = "ib"
|
||||
# Dump the TMD and set it in the WAD.
|
||||
self.wad.set_tmd_data(self.tmd.dump())
|
||||
# Dump the Ticket and set it in the WAD.
|
||||
|
Loading…
x
Reference in New Issue
Block a user