mirror of
https://github.com/NinjaCheetah/libWiiPy.git
synced 2025-04-25 21:01:01 -04:00
Fix handling WADs where content index != actual index in the array
This commit is contained in:
parent
4f96e1b0d9
commit
e70b9570de
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "libWiiPy"
|
||||
version = "0.4.1"
|
||||
version = "0.4.2"
|
||||
authors = [
|
||||
{ name="NinjaCheetah", email="ninjacheetah@ncxprogramming.com" },
|
||||
{ name="Lillian Skinner", email="lillian@randommeaninglesscharacters.com" }
|
||||
|
@ -355,7 +355,10 @@ class ContentRegion:
|
||||
"Expected hash is: {}\n".format(self.content_records[index].content_hash.decode()) +
|
||||
"Actual hash is: {}".format(content_hash))
|
||||
# If the hash matches, encrypt the content and set it where it belongs.
|
||||
enc_content = encrypt_content(dec_content, title_key, index)
|
||||
# This uses the index from the content records instead of just the index given, because there are some strange
|
||||
# circumstances where the actual index in the array and the assigned content index don't match up, and this
|
||||
# needs to accommodate that.
|
||||
enc_content = encrypt_content(dec_content, title_key, self.content_records[index].index)
|
||||
if (index + 1) > len(self.content_list):
|
||||
self.content_list.append(enc_content)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user