#5538 - Validation of custom g-code against gcode processor reserved keywords

This commit is contained in:
enricoturri1966 2021-02-18 14:34:40 +01:00
parent aec39aaba6
commit 86d7e1fb90
7 changed files with 389 additions and 23 deletions

View file

@ -116,8 +116,13 @@ void GCodeReader::parse_file(const std::string &file, callback_t callback)
{
boost::nowide::ifstream f(file);
std::string line;
#if ENABLE_VALIDATE_CUSTOM_GCODE
m_parsing = true;
while (m_parsing && std::getline(f, line))
#else
m_parsing_file = true;
while (m_parsing_file && std::getline(f, line))
#endif // ENABLE_VALIDATE_CUSTOM_GCODE
this->parse_line(line, callback);
}