Fix breaking loop/Stack Overflow bug

This commit is contained in:
Michael 2021-05-15 06:57:04 -05:00
parent 134346bc70
commit 8cdca9ffb0
No known key found for this signature in database
GPG key ID: 96FB9C8062A1892B

8
TMD.cs
View file

@ -318,12 +318,12 @@ namespace libWiiSharp
string path = str1 + str2 + str3 + ".app"; string path = str1 + str2 + str3 + ".app";
conts[index] = File.ReadAllBytes(path); conts[index] = File.ReadAllBytes(path);
} }
UpdateContents(conts); UpdateContentsBytes(conts);
} }
public void UpdateContents(byte[][] contents) public void UpdateContents(byte[][] contents)
{ {
UpdateContents(contents); UpdateContentsBytes(contents);
} }
public string GetUpperTitleID() public string GetUpperTitleID()
@ -491,8 +491,7 @@ namespace libWiiSharp
FireDebug("Writing TMD Finished..."); FireDebug("Writing TMD Finished...");
} }
/* private void UpdateContentsBytes(byte[][] conts)
private void PrivUpdateContents(byte[][] conts)
{ {
SHA1 shA1 = SHA1.Create(); SHA1 shA1 = SHA1.Create();
for (int index = 0; index < this.contents.Count; ++index) for (int index = 0; index < this.contents.Count; ++index)
@ -502,7 +501,6 @@ namespace libWiiSharp
} }
shA1.Clear(); shA1.Clear();
} }
*/
private void ParseTmd(Stream tmdFile) private void ParseTmd(Stream tmdFile)
{ {