Skip to content

Commit

Permalink
Fix of a multi-material g-code export.
Browse files Browse the repository at this point in the history
  • Loading branch information
bubnikv committed May 15, 2017
1 parent 60c65f6 commit 74346ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xs/src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ void GCode::process_layer(
for (size_t i = 1; i < extruder_ids.size(); ++ i)
if (extruder_ids[i] == m_writer.extruder()->id) {
// Move the last extruder to the front.
memmove(extruder_ids.data() + 1, extruder_ids.data(), i);
memmove(extruder_ids.data() + 1, extruder_ids.data(), i * sizeof(unsigned int));
extruder_ids.front() = m_writer.extruder()->id;
break;
}
Expand Down Expand Up @@ -808,7 +808,7 @@ void GCode::process_layer(
for (size_t i = 1; i < extruders.size(); ++ i)
if (extruders[i] == m_writer.extruder()->id) {
// Move the last extruder to the front.
memmove(extruders.data() + 1, extruders.data(), i);
memmove(extruders.data() + 1, extruders.data(), i * sizeof(unsigned int));
extruders.front() = m_writer.extruder()->id;
break;
}
Expand Down

0 comments on commit 74346ef

Please sign in to comment.