1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-24 00:26:01 +00:00

Return false on overflow

This commit is contained in:
FICTURE7 2021-04-10 15:09:28 +04:00
parent 6c28be13a8
commit 311f1fbba5

View file

@ -45,9 +45,9 @@ namespace ARMeilleure.Common
_freeHint = _allocated.FindFirstUnset();
}
if (_freeHint < _table.Length)
if (_freeHint >= 0 && _freeHint < _table.Length)
{
index = checked(_freeHint++);
index = _freeHint++;
_allocated.Set(index);