From 0c2164330b82d6abfb783b654f9ea93de0fb91f6 Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 19 Sep 2025 20:26:32 +0200 Subject: [PATCH] Use at instead of operator[] to access nif record types To fix crash on out of bounds access. --- components/nif/niffile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/nif/niffile.cpp b/components/nif/niffile.cpp index 02233a2b3c..c0a1da4846 100644 --- a/components/nif/niffile.cpp +++ b/components/nif/niffile.cpp @@ -674,7 +674,7 @@ namespace Nif { std::unique_ptr r; - std::string rec = hasRecTypeListings ? recTypes[recTypeIndices[i]] : nif.get(); + std::string rec = hasRecTypeListings ? recTypes.at(recTypeIndices[i]) : nif.get(); if (rec.empty()) { std::stringstream error;