Bugfix: legacy config files with empty temperature and/or first_layer_temperature caused crash

This commit is contained in:
Alessandro Ranellucci 2012-08-08 16:25:13 +02:00
parent b048f51edd
commit 3888727b96

View File

@ -157,7 +157,7 @@ our $Options = {
type => 'i',
max => 300,
serialize => sub { join ',', @{$_[0]} },
deserialize => sub { [ split /,/, $_[0] ] },
deserialize => sub { $_[0] ? [ split /,/, $_[0] ] : [0] },
default => [200],
},
'first_layer_temperature' => {
@ -167,7 +167,7 @@ our $Options = {
cli => 'first-layer-temperature=i@',
type => 'i',
serialize => sub { join ',', @{$_[0]} },
deserialize => sub { [ split /,/, $_[0] ] },
deserialize => sub { $_[0] ? [ split /,/, $_[0] ] : [0] },
max => 300,
default => [200],
},