forked from mirror/openmw-tes3mp
Fix error handling for out-of-range NIF roots (found in Bosmora, TR)
This commit is contained in:
parent
db16cdad02
commit
c621d0400c
1 changed files with 2 additions and 2 deletions
|
@ -193,9 +193,9 @@ void NIFFile::parse()
|
||||||
for(size_t i = 0;i < rootNum;i++)
|
for(size_t i = 0;i < rootNum;i++)
|
||||||
{
|
{
|
||||||
int idx = nif.getInt();
|
int idx = nif.getInt();
|
||||||
if (idx >= 0)
|
if (idx >= 0 && idx < int(records.size()))
|
||||||
{
|
{
|
||||||
roots[i] = records.at(idx);
|
roots[i] = records[idx];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue