Properly set the first map entry when creating a JournalStream

This commit is contained in:
Alex Barney 2018-08-31 17:54:45 -05:00
parent 3d8d3992eb
commit f1ac965df8
2 changed files with 5 additions and 2 deletions

View file

@ -17,6 +17,9 @@ namespace LibHac.Savefile
Map = map;
BlockSize = blockSize;
Length = map.Length * BlockSize;
CurrentMapEntry = Map[0];
BaseStream.Position = CurrentMapEntry.PhysicalIndex * BlockSize;
}
public override int Read(byte[] buffer, int offset, int count)

View file

@ -103,8 +103,8 @@ namespace NandReader
{
var tickets = new List<Ticket>();
var save = new Savefile(savefile);
var ticketList = new BinaryReader(save.OpenFile("ticket_list.bin"));
var ticketFile = new BinaryReader(save.OpenFile("ticket.bin"));
var ticketList = new BinaryReader(save.OpenFile("/ticket_list.bin"));
var ticketFile = new BinaryReader(save.OpenFile("/ticket.bin"));
var titleId = ticketList.ReadUInt64();
while (titleId != ulong.MaxValue)