diff --git a/components/esm4/reader.cpp b/components/esm4/reader.cpp index 43a9e26418..93de160e5e 100644 --- a/components/esm4/reader.cpp +++ b/components/esm4/reader.cpp @@ -922,7 +922,7 @@ namespace ESM4 std::string printLabel(const GroupLabel& label, const std::uint32_t type) { std::ostringstream ss; - ss << sGroupType[std::min(type, std::size(sGroupType))]; // avoid out of range + ss << sGroupType[std::min(type, std::size(sGroupType) - 1)]; // avoid out of range switch (type) {