From ff5b4a1ae8e88a94c54343e7c079f9df4b0d4b41 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Thu, 7 Nov 2013 04:55:57 -0300 Subject: [PATCH] cameo/zstack.pl: use the entire number for (x, y, z0) --- cameo/zstack.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cameo/zstack.pl b/cameo/zstack.pl index 345b9ff..e672d14 100755 --- a/cameo/zstack.pl +++ b/cameo/zstack.pl @@ -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;