From 2c932b1bf4613e9bc9182e303a4fd16950510d97 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Sun, 26 Feb 2017 22:59:25 +0100 Subject: [PATCH] Fixed a bug in AMF serialization. --- xs/src/libslic3r/Format/AMF.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xs/src/libslic3r/Format/AMF.cpp b/xs/src/libslic3r/Format/AMF.cpp index 0d19e25ad..96e35e528 100644 --- a/xs/src/libslic3r/Format/AMF.cpp +++ b/xs/src/libslic3r/Format/AMF.cpp @@ -521,7 +521,7 @@ bool store_amf(const char *path, Model *model) for (const auto &attr : material.second->attributes) fprintf(file, " %s\n", attr.first.c_str(), attr.second.c_str()); for (const std::string &key : material.second->config.keys()) - fprintf(file, " %s\n", key.c_str(), material.second->config.serialize(key)); + fprintf(file, " %s\n", key.c_str(), material.second->config.serialize(key).c_str()); fprintf(file, " \n"); } std::string instances; @@ -529,7 +529,7 @@ bool store_amf(const char *path, Model *model) ModelObject *object = model->objects[object_id]; fprintf(file, " \n", object_id); for (const std::string &key : object->config.keys()) - fprintf(file, " %s\n", key.c_str(), object->config.serialize(key)); + fprintf(file, " %s\n", key.c_str(), object->config.serialize(key).c_str()); if (! object->name.empty()) fprintf(file, " %s\n", object->name.c_str()); std::vector layer_height_profile = object->layer_height_profile_valid ? object->layer_height_profile : std::vector(); @@ -573,7 +573,7 @@ bool store_amf(const char *path, Model *model) else fprintf(file, " \n", volume->material_id().c_str()); for (const std::string &key : volume->config.keys()) - fprintf(file, " %s\n", key.c_str(), volume->config.serialize(key)); + fprintf(file, " %s\n", key.c_str(), volume->config.serialize(key).c_str()); if (! volume->name.empty()) fprintf(file, " %s\n", volume->name.c_str()); if (volume->modifier)