Skip to content

Commit 4a3e9f8

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 8eeebd1 + 3b7a2d0 commit 4a3e9f8

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/libWiiPy/crypto.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ def decrypt_content(content_enc, title_key, content_index, content_length) -> by
7272
# Decrypt the content using the AES object.
7373
content_dec = aes.decrypt(content_enc)
7474
# Trim additional bytes that may have been added so the content is the correct size.
75-
while len(content_dec) > content_length:
76-
content_dec = content_dec[:-1]
75+
content_dec = content_dec[:content_length]
7776
return content_dec
7877

7978

src/libWiiPy/title.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ def dump_wad(self) -> bytes:
7070
wad_data : bytes
7171
The raw data of the WAD.
7272
"""
73+
# Set WAD type to ib if the title being packed is boot2.
74+
if self.tmd.title_id == "0000000100000001":
75+
self.wad.wad_type = "ib"
7376
# Dump the TMD and set it in the WAD.
7477
self.wad.set_tmd_data(self.tmd.dump())
7578
# Dump the Ticket and set it in the WAD.

src/libWiiPy/tmd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def get_title_type(self) -> str:
257257
Gets the type of the TMD's associated title.
258258
259259
Can be one of several possible values:
260-
'System', 'Game', 'Channel', 'SystemChannel', 'GameWithChannel', or 'HiddenChannel'
260+
'System', 'Game', 'Channel', 'SystemChannel', 'GameChannel', or 'HiddenChannel'
261261
262262
Returns
263263
-------
@@ -275,7 +275,7 @@ def get_title_type(self) -> str:
275275
case '00010002':
276276
return "SystemChannel"
277277
case '00010004':
278-
return "GameWithChannel"
278+
return "GameChannel"
279279
case '00010005':
280280
return "DLC"
281281
case '00010008':

0 commit comments

Comments
 (0)