Fix t/support.t

This commit is contained in:
Alessandro Ranellucci 2013-11-02 11:32:23 +01:00
parent 3f7adfc07d
commit f491b7ba71

View File

@ -242,7 +242,7 @@ sub support_layers_z {
# add raft layers by dividing the space between first layer and
# first contact layer evenly
if ($self->config->raft_layers > 1) {
if ($self->config->raft_layers > 1 && @z >= 2) {
# $z[1] is last raft layer (contact layer for the first layer object)
my $height = ($z[1] - $z[0]) / ($self->config->raft_layers - 1);
splice @z, 1, 0,