From 3af2c20bb259234106f23e01c5d6ea6e36870dc4 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sun, 13 Nov 2022 13:02:12 +0800 Subject: [PATCH] fix a gcode preview compatibility issue --- src/libslic3r/Config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp index 3800aefb81..c6e6c1797a 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -1150,7 +1150,7 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, Fo bool end_found = false; std::string line; while (std::getline(ifs, line)) - if (line == "; CONFIG_BLOCK_START") { + if (line.rfind("; CONFIG_BLOCK_START",0)==0) { begin_found = true; break; } @@ -1160,7 +1160,7 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, Fo } std::string key, value; while (std::getline(ifs, line)) { - if (line == "; CONFIG_BLOCK_END") { + if (line.rfind("; CONFIG_BLOCK_END",0)==0) { end_found = true; break; }