mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Fix ini1 reading and fix a blz decompression bug
This commit is contained in:
parent
a59dc611c2
commit
dfb2560707
2 changed files with 3 additions and 3 deletions
|
@ -203,7 +203,7 @@ namespace LibHac
|
||||||
Kips[i] = new KipReader();
|
Kips[i] = new KipReader();
|
||||||
Kips[i].Initialize(Storage.Slice(offset)).ThrowIfFailure();
|
Kips[i].Initialize(Storage.Slice(offset)).ThrowIfFailure();
|
||||||
|
|
||||||
offset += Kips[i].GetUncompressedSize();
|
offset += Kips[i].GetFileSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ namespace LibHac.Loader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int GetFileSize()
|
public int GetFileSize()
|
||||||
{
|
{
|
||||||
int size = Unsafe.SizeOf<KipHeader>();
|
int size = Unsafe.SizeOf<KipHeader>();
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ namespace LibHac.Loader
|
||||||
if (buffer.Length < totalCompSize + additionalSize)
|
if (buffer.Length < totalCompSize + additionalSize)
|
||||||
return ResultLibHac.BufferTooSmall.Log();
|
return ResultLibHac.BufferTooSmall.Log();
|
||||||
|
|
||||||
Span<byte> data = buffer;
|
Span<byte> data = buffer.Slice(compressedDataSize - totalCompSize);
|
||||||
|
|
||||||
int inOffset = totalCompSize - footerSize;
|
int inOffset = totalCompSize - footerSize;
|
||||||
int outOffset = totalCompSize + additionalSize;
|
int outOffset = totalCompSize + additionalSize;
|
||||||
|
|
Loading…
Reference in a new issue