cameo/zstack.pl: use the entire number for (x, y, z0)

This commit is contained in:
Werner Almesberger 2013-11-07 04:55:57 -03:00
parent d64a34045f
commit ff5b4a1ae8
1 changed files with 3 additions and 3 deletions

View File

@ -54,10 +54,10 @@ while (<>) {
$z{$z} .= "$s\n";
undef $s;
}
if (/^-?\d+(\.\d*)?\s+-?\d+(\.\d*)?\s+(-?\d+(\.\d*)?)/) {
if (/^(-?\d+(\.\d*)?)\s+(-?\d+(\.\d*)?)\s+(-?\d+(\.\d*)?)/) {
$x = $1 unless defined $x;
$y = $2 unless defined $y;
$z = $3;
$y = $3 unless defined $y;
$z = $5;
}
$s .= $_;
$zmax = $z if $z > $zmax || !defined $zmax;