Fix RomFsDictionary off-by-one error

When retrieving an entry that happened to be the last entry in the table, the dictionary would incorrectly say that the lookup failed. Fixes #32
This commit is contained in:
Alex Barney 2019-02-15 13:54:37 -06:00
parent 46682cd4dd
commit 0e118ae170

View file

@ -49,7 +49,7 @@ namespace LibHac.IO.RomFs
public bool TryGetValue(int offset, out RomKeyValuePair<T> value)
{
if (offset < 0 || offset + _sizeOfEntry >= Entries.Length)
if (offset < 0 || offset + _sizeOfEntry > Entries.Length)
{
value = default;
return false;