diff --git a/apps/openmw/mwgui/charactercreation.cpp b/apps/openmw/mwgui/charactercreation.cpp index 65a1be9c51..257c01d996 100644 --- a/apps/openmw/mwgui/charactercreation.cpp +++ b/apps/openmw/mwgui/charactercreation.cpp @@ -107,9 +107,10 @@ namespace MWGui if (id.starts_with(prefix) && id.size() == prefix.size() + 1) { char index = id[prefix.size()]; - auto attribute = static_cast(index - '0' - 1); - if (attribute >= ESM::Attribute::Strength && attribute < ESM::Attribute::Length) + if (index >= '1' && index <= '8') { + // Match [AttribVal1-AttribVal8] to the corresponding AttributeID values [0-7] + auto attribute = static_cast(index - '0' - 1); mPlayerAttributes[attribute] = value; if (mReviewDialog) mReviewDialog->setAttribute(attribute, value);