Bugfix: Uninitialized value in wipe tower integration.

Just a small fix to avoid c++ undefined behaviour.
This commit is contained in:
Martin Šach 2023-11-09 10:52:38 +01:00 committed by SachCZ
parent 9a68645106
commit cfb6526732

View File

@ -157,8 +157,11 @@ std::string WipeTowerIntegration::post_process_wipe_tower_moves(const WipeTower:
while (line_str >> ch) {
if (ch == 'X' || ch == 'Y')
line_str >> (ch == 'X' ? pos.x() : pos.y());
else if (ch == 'Z')
line_str >> *z;
else if (ch == 'Z') {
float z_value;
line_str >> z_value;
z = z_value;
}
else
line_out << ch;
}