Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-05-15 17:42:29 +0300
committerbubnikv <bubnikv@gmail.com>2017-05-15 17:42:29 +0300
commit74346efccb6c1195476ac9dc7c76b353550ccb4b (patch)
tree2551356eb175525be7894f448de1842034f4f059
parent60c65f6da78ecde78ed55434681420ecee298ea0 (diff)
Fix of a multi-material g-code export.version_1.34.1.24
-rw-r--r--xs/src/libslic3r/GCode.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp
index cdcb06d6f..ce0be2ec8 100644
--- a/xs/src/libslic3r/GCode.cpp
+++ b/xs/src/libslic3r/GCode.cpp
@@ -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;
}
@@ -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;
}