mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
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:
parent
46682cd4dd
commit
0e118ae170
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue