Fix getting structure size in RomFsDictionary

This commit is contained in:
Alex Barney 2019-08-08 18:12:07 -05:00
parent 7099b3cdf2
commit 4ef297be7f

View file

@ -202,7 +202,7 @@ namespace LibHac.Fs.RomFs
private int CountEntries() private int CountEntries()
{ {
int count = 0; int count = 0;
int nextStructOffset = (sizeof(int) + Marshal.SizeOf<T>()) / 4; int nextStructOffset = (sizeof(int) + Unsafe.SizeOf<T>()) / 4;
Span<int> data = MemoryMarshal.Cast<byte, int>(Entries.AsSpan()); Span<int> data = MemoryMarshal.Cast<byte, int>(Entries.AsSpan());
for (int i = 0; i < Buckets.Length; i++) for (int i = 0; i < Buckets.Length; i++)