diff --git a/xs/src/libslic3r/ConditionalGcode.cpp b/xs/src/libslic3r/ConditionalGcode.cpp index 248f6d359..bfc74a55a 100644 --- a/xs/src/libslic3r/ConditionalGcode.cpp +++ b/xs/src/libslic3r/ConditionalGcode.cpp @@ -44,6 +44,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 << "}"; } std::string output = result.str(); trim(output); diff --git a/xs/t/24_gcodemath.t b/xs/t/24_gcodemath.t index 5cee43989..1aeba40d0 100644 --- a/xs/t/24_gcodemath.t +++ b/xs/t/24_gcodemath.t @@ -41,6 +41,6 @@ use Test::More tests => 6; my $test_string = "M104 S{a}; Sets temp to {4*5}"; my $result = Slic3r::ConditionalGCode::apply_math($test_string); - is $result, "M104 S; Sets temp to 20", 'Blank string emittal on failure to parse'; + is $result, "M104 S{a}; Sets temp to 20", 'Original string emittal on failure to parse'; } }