Skip to content

Commit

Permalink
Fixed NEO-GEO bug, this method is not supported by SharpZipLib so I s…
Browse files Browse the repository at this point in the history
…witched to an alternate way of getting the archived files
  • Loading branch information
CatmanFan committed Dec 25, 2024
1 parent 611a996 commit bcca0db
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions FriishProduce/_classes/Creators/WiiVC/NEO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,25 @@ private byte[] ExtractToByteArray(string file)
{
using (var s = ZIP.GetInputStream(entry))
{
byte[] bytes;
using BinaryReader r = new(s);
bytes = r.ReadBytes((int)s.Length);
return bytes;
List<byte> bytes = new();

int curByte = s.ReadByte();
while (curByte != -1)
{
bytes.Add(Convert.ToByte(curByte));
curByte = s.ReadByte();
}

return bytes.ToArray();
}
}

throw new FileNotFoundException();
return null;
}
catch

catch (Exception ex)
{
return null;
throw ex;
}
}

Expand Down

0 comments on commit bcca0db

Please sign in to comment.