mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Properly set the first map entry when creating a JournalStream
This commit is contained in:
parent
3d8d3992eb
commit
f1ac965df8
2 changed files with 5 additions and 2 deletions
|
@ -17,6 +17,9 @@ namespace LibHac.Savefile
|
||||||
Map = map;
|
Map = map;
|
||||||
BlockSize = blockSize;
|
BlockSize = blockSize;
|
||||||
Length = map.Length * BlockSize;
|
Length = map.Length * BlockSize;
|
||||||
|
|
||||||
|
CurrentMapEntry = Map[0];
|
||||||
|
BaseStream.Position = CurrentMapEntry.PhysicalIndex * BlockSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int Read(byte[] buffer, int offset, int count)
|
public override int Read(byte[] buffer, int offset, int count)
|
||||||
|
|
|
@ -103,8 +103,8 @@ namespace NandReader
|
||||||
{
|
{
|
||||||
var tickets = new List<Ticket>();
|
var tickets = new List<Ticket>();
|
||||||
var save = new Savefile(savefile);
|
var save = new Savefile(savefile);
|
||||||
var ticketList = new BinaryReader(save.OpenFile("ticket_list.bin"));
|
var ticketList = new BinaryReader(save.OpenFile("/ticket_list.bin"));
|
||||||
var ticketFile = new BinaryReader(save.OpenFile("ticket.bin"));
|
var ticketFile = new BinaryReader(save.OpenFile("/ticket.bin"));
|
||||||
|
|
||||||
var titleId = ticketList.ReadUInt64();
|
var titleId = ticketList.ReadUInt64();
|
||||||
while (titleId != ulong.MaxValue)
|
while (titleId != ulong.MaxValue)
|
||||||
|
|
Loading…
Reference in a new issue