1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

Fix Oblivion loading

Found by elsid@, and due to !3043
This commit is contained in:
jvoisin 2023-05-22 18:24:39 +02:00
parent 45c84a2426
commit a9bf671992

View File

@ -529,7 +529,7 @@ namespace ESM4
{
if (mCtx.groupStack.size() == 0)
throw std::runtime_error("ESM4::Reader::grp mCtx.groupStack.size is zero");
if (pos <= mCtx.groupStack.size() - 1)
if (pos > mCtx.groupStack.size() - 1)
throw std::runtime_error("ESM4::Reader::grp - exceeded stack depth");
return (*(mCtx.groupStack.end() - pos - 1)).first;