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

degen-loop-screen
Alessandro Ranellucci 2012-08-08 16:25:13 +02:00
parent b048f51edd
commit 3888727b96
1 changed files with 2 additions and 2 deletions

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],
},