Fix ini1 reading and fix a blz decompression bug

This commit is contained in:
Alex Barney 2020-06-04 00:52:52 -07:00
parent a59dc611c2
commit dfb2560707
2 changed files with 3 additions and 3 deletions

View file

@ -203,7 +203,7 @@ namespace LibHac
Kips[i] = new KipReader();
Kips[i].Initialize(Storage.Slice(offset)).ThrowIfFailure();
offset += Kips[i].GetUncompressedSize();
offset += Kips[i].GetFileSize();
}
}
}

View file

@ -97,7 +97,7 @@ namespace LibHac.Loader
}
}
private int GetFileSize()
public int GetFileSize()
{
int size = Unsafe.SizeOf<KipHeader>();
@ -248,7 +248,7 @@ namespace LibHac.Loader
if (buffer.Length < totalCompSize + additionalSize)
return ResultLibHac.BufferTooSmall.Log();
Span<byte> data = buffer;
Span<byte> data = buffer.Slice(compressedDataSize - totalCompSize);
int inOffset = totalCompSize - footerSize;
int outOffset = totalCompSize + additionalSize;