1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-01 18:04:31 +00:00

Use at instead of operator[] to access nif record types

To fix crash on out of bounds access.
This commit is contained in:
elsid 2025-09-19 20:26:32 +02:00
parent 20c388a410
commit 0c2164330b
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -674,7 +674,7 @@ namespace Nif
{
std::unique_ptr<Record> r;
std::string rec = hasRecTypeListings ? recTypes[recTypeIndices[i]] : nif.get<std::string>();
std::string rec = hasRecTypeListings ? recTypes.at(recTypeIndices[i]) : nif.get<std::string>();
if (rec.empty())
{
std::stringstream error;