diff --git a/xs/src/libslic3r/ConditionalGcode.cpp b/xs/src/libslic3r/ConditionalGcode.cpp index ee28b7a7c..6bef678df 100644 --- a/xs/src/libslic3r/ConditionalGcode.cpp +++ b/xs/src/libslic3r/ConditionalGcode.cpp @@ -61,7 +61,7 @@ std::string evaluate(const std::string& expression_string) { #if SLIC3R_DEBUG std::cerr << __FILE__ << ":" << __LINE__ << " "<< "Failed to parse: " << expression_string.c_str() << std::endl; #endif - result << "" << expression_string << ""; + result << "\x80" << expression_string << "\x81"; } std::string output = result.str(); trim(output); diff --git a/xs/t/24_gcodemath.t b/xs/t/24_gcodemath.t index 70663809e..8989b2b55 100644 --- a/xs/t/24_gcodemath.t +++ b/xs/t/24_gcodemath.t @@ -47,6 +47,6 @@ use Test::More tests => 7; my $test_string = "M104 S{a}; Sets temp to {4*5}"; my $result = Slic3r::ConditionalGCode::apply_math($test_string); - is $result, "M104 Sa; Sets temp to 20", 'string (minus brackets) on failure to parse.'; + is $result, "M104 S{a}; Sets temp to 20", 'string (minus brackets) on failure to parse.'; } }