Fix Abstract Parser not being able to display parsing errors from defines proxy on empty line

This commit is contained in:
Jan 2021-11-22 09:42:46 +01:00
parent 0ffa85d557
commit ba3084700e

View File

@ -80,7 +80,7 @@ public:
const auto pos = e.Position();
const auto line = m_lexer->GetLineForPos(pos);
if (!line.IsEof())
if (!line.IsEof() && line.m_line.size() > static_cast<unsigned>(pos.m_column - 1))
{
std::cout << "Error: " << e.FullMessage() << "\n" << line.m_line.substr(pos.m_column - 1) << std::endl;
}