From aec1372c5bb236e5b42355f671b3fb59eb22e56b Mon Sep 17 00:00:00 2001 From: Jan Laupetin Date: Sat, 28 Feb 2026 22:53:02 +0100 Subject: [PATCH] fix: vertex decl compiler not recognizing abbreviations with more than 1 digit --- .../Techset/CommonVertexDeclCreator.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/ObjCommon/Techset/CommonVertexDeclCreator.cpp b/src/ObjCommon/Techset/CommonVertexDeclCreator.cpp index 959a5875..ec100fe4 100644 --- a/src/ObjCommon/Techset/CommonVertexDeclCreator.cpp +++ b/src/ObjCommon/Techset/CommonVertexDeclCreator.cpp @@ -2,7 +2,7 @@ #include "Utils/Logging/Log.h" -#include +#include namespace { @@ -11,16 +11,12 @@ namespace if (offset >= assetName.size()) return false; - if (offset + 1 < assetName.size() && isdigit(assetName[offset + 1])) - { - abbreviation = std::string(assetName, offset, 2); - offset += 2; - } - else - { - abbreviation = std::string(assetName, offset, 1); - offset += 1; - } + auto digitCount = 0; + while (offset + digitCount + 1 < assetName.size() && isdigit(assetName[offset + digitCount + 1])) + digitCount++; + + abbreviation = std::string(assetName, offset, digitCount + 1); + offset += digitCount + 1; return true; }