Fix of #8827: Parsing error in the pressure equalizer when tag TIMELAPSE_TAKE_FRAME was inside G-code.

This commit is contained in:
Lukáš Hejl 2022-09-15 08:59:11 +02:00
parent 424ef02d8a
commit b2b9444b6e

View File

@ -367,7 +367,16 @@ bool PressureEqualizer::process_line(const char *line, const char *line_end, GCo
case 'T':
{
// Activate an extruder head.
int new_extruder = parse_int(line);
int new_extruder = -1;
try {
new_extruder = parse_int(line);
} catch (Slic3r::InvalidArgument &) {
// Ignore invalid GCodes starting with T.
eatws(line);
break;
}
assert(new_extruder != -1);
if (new_extruder != int(m_current_extruder)) {
m_current_extruder = new_extruder;
m_retracted = true;