Match FS behavior when checking if an NCA section exists

This commit is contained in:
Alex Barney 2019-05-06 21:42:53 -05:00
parent 3888a03a92
commit 6aa15c0691

View file

@ -128,7 +128,11 @@ namespace LibHac.IO.NcaUtils
public bool IsSectionEnabled(int index) public bool IsSectionEnabled(int index)
{ {
return GetSectionEntry(index).IsEnabled; ref NcaSectionEntryStruct info = ref GetSectionEntry(index);
int sectStart = info.StartBlock;
int sectSize = info.EndBlock - sectStart;
return sectStart != 0 || sectSize != 0;
} }
public Span<byte> GetFsHeaderHash(int index) public Span<byte> GetFsHeaderHash(int index)