mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-21 00:25:44 +00:00
Fix zone definition parser adding spaces after field to field value
This commit is contained in:
parent
49f19d95c2
commit
648fed20a6
@ -14,6 +14,7 @@ std::string ZoneDefinitionLexer::ReadField()
|
|||||||
|
|
||||||
const auto startPos = m_current_line_offset - 1;
|
const auto startPos = m_current_line_offset - 1;
|
||||||
const auto lineSize = currentLine.m_line.size();
|
const auto lineSize = currentLine.m_line.size();
|
||||||
|
auto lastNonSpaceOffset = m_current_line_offset;
|
||||||
while (m_current_line_offset < lineSize)
|
while (m_current_line_offset < lineSize)
|
||||||
{
|
{
|
||||||
const auto c = currentLine.m_line[m_current_line_offset];
|
const auto c = currentLine.m_line[m_current_line_offset];
|
||||||
@ -36,9 +37,12 @@ std::string ZoneDefinitionLexer::ReadField()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
m_current_line_offset++;
|
m_current_line_offset++;
|
||||||
|
|
||||||
|
if (!isspace(c))
|
||||||
|
lastNonSpaceOffset = m_current_line_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::string(currentLine.m_line, startPos, m_current_line_offset - startPos);
|
return std::string(currentLine.m_line, startPos, lastNonSpaceOffset - startPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
ZoneDefinitionParserValue ZoneDefinitionLexer::GetNextToken()
|
ZoneDefinitionParserValue ZoneDefinitionLexer::GetNextToken()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user