mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-03-05 12:33:02 +00:00
fix: vertex decl compiler not recognizing abbreviations with more than 1 digit
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Utils/Logging/Log.h"
|
#include "Utils/Logging/Log.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <string>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@@ -11,16 +11,12 @@ namespace
|
|||||||
if (offset >= assetName.size())
|
if (offset >= assetName.size())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (offset + 1 < assetName.size() && isdigit(assetName[offset + 1]))
|
auto digitCount = 0;
|
||||||
{
|
while (offset + digitCount + 1 < assetName.size() && isdigit(assetName[offset + digitCount + 1]))
|
||||||
abbreviation = std::string(assetName, offset, 2);
|
digitCount++;
|
||||||
offset += 2;
|
|
||||||
}
|
abbreviation = std::string(assetName, offset, digitCount + 1);
|
||||||
else
|
offset += digitCount + 1;
|
||||||
{
|
|
||||||
abbreviation = std::string(assetName, offset, 1);
|
|
||||||
offset += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user