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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-11-29 22:38:19 +0300
committerbubnikv <bubnikv@gmail.com>2017-11-29 22:38:19 +0300
commit2f54bf5bca2e151bb2d7c08268c8ceb4de688466 (patch)
treee8a4b0caee39944a0f1f8fc6444d1c2e018976b0
parentf754cb422beb95c9d66f6e9ed5cd04bfc6a6676a (diff)
Fixed a random crash in the PlaceholderParser due to deallocatingversion_1.38.2
an undefined pointer.
-rw-r--r--xs/src/libslic3r/PlaceholderParser.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/xs/src/libslic3r/PlaceholderParser.cpp b/xs/src/libslic3r/PlaceholderParser.cpp
index 07f07c161..060252387 100644
--- a/xs/src/libslic3r/PlaceholderParser.cpp
+++ b/xs/src/libslic3r/PlaceholderParser.cpp
@@ -145,7 +145,7 @@ namespace client
template<typename Iterator>
struct expr
{
- expr() { this->reset(); }
+ expr() : type(TYPE_EMPTY) {}
explicit expr(bool b) : type(TYPE_BOOL) { data.b = b; }
explicit expr(bool b, const Iterator &it_begin, const Iterator &it_end) : type(TYPE_BOOL), it_range(it_begin, it_end) { data.b = b; }
explicit expr(int i) : type(TYPE_INT) { data.i = i; }
@@ -188,7 +188,6 @@ namespace client
{
if (this->type == TYPE_STRING)
delete data.s;
- memset(data.raw, 0, sizeof(data.raw));
this->type = TYPE_EMPTY;
}