From 3ed87d8ea135ce9f6728a00f972aaaf29a5c8ba8 Mon Sep 17 00:00:00 2001 From: "gb.luke" Date: Sat, 18 Jun 2011 08:20:28 +0000 Subject: [PATCH] U8.cs, Lz77.cs: Applied patch by castorinop. (Fixes issue 14) NusClient.cs: Added fix by madri2, and custom fix to hopefully fix Demae channel issue. Update issue 11 Status: Started v patch readded, working on scripting not ignoring checkboxes. Update issue 9 Status: Fixed This should be fixed. Needs a rebuild, can't do that from where I am now. --- NUS Downloader/Lz77.cs | 2 +- NUS Downloader/NusClient.cs | 4 +++- NUS Downloader/U8.cs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NUS Downloader/Lz77.cs b/NUS Downloader/Lz77.cs index 0433197..809ed6f 100644 --- a/NUS Downloader/Lz77.cs +++ b/NUS Downloader/Lz77.cs @@ -331,7 +331,7 @@ namespace libWiiSharp { int i, p, cmp; cmp = 1; - p = N + 1 + (textBuffer[r] == 0xffff ? 0 : textBuffer[r]); + p = N + 1 + (textBuffer[r] == 0xffff ? 0 : (int)textBuffer[r]); rightSon[r] = leftSon[r] = N; matchLength = 0; for (; ; ) diff --git a/NUS Downloader/NusClient.cs b/NUS Downloader/NusClient.cs index 135de20..97de08e 100644 --- a/NUS Downloader/NusClient.cs +++ b/NUS Downloader/NusClient.cs @@ -456,7 +456,9 @@ namespace libWiiSharp fireDebug(" - Creating WAD..."); WAD wad = WAD.Create(cert, tik, tmd, contents); wad.RemoveFooter(); - wadName = wadName.Replace("[v]", this.TitleVersion.ToString()); + wadName = wadName.Replace("[v]", "v" + this.TitleVersion.ToString()); // fix by madri2 + if (Path.DirectorySeparatorChar.ToString() != "/" && Path.AltDirectorySeparatorChar.ToString() != "/") + wadName = wadName.Replace("/", ""); if (wadName.Contains(Path.DirectorySeparatorChar.ToString()) || wadName.Contains(Path.AltDirectorySeparatorChar.ToString())) wad.Save(wadName); else diff --git a/NUS Downloader/U8.cs b/NUS Downloader/U8.cs index 409d3af..3d73107 100644 --- a/NUS Downloader/U8.cs +++ b/NUS Downloader/U8.cs @@ -826,7 +826,7 @@ namespace libWiiSharp int size = u8Nodes.Count + 2; for (int j = 0; j < dirEntries.Length; j++) - if (dirEntries[j].Contains(dirEntries[i] + "\\")) size++; + if (dirEntries[j].Contains(dirEntries[i] + System.IO.Path.DirectorySeparatorChar.ToString())) size++; tempNode.SizeOfData = (uint)size; }