mirror of
https://github.com/schoebel/mars
synced 2025-01-14 02:50:48 +00:00
marsadm: fix invalid subtraction in corner case
This commit is contained in:
parent
d4c64f60fd
commit
e71faba173
@ -5720,8 +5720,11 @@ sub eval_fn {
|
||||
}
|
||||
my $lnk = $$env{"resdir"} . "/actual-$peer/" . $transl{$op};
|
||||
my $result = get_link($lnk, 2);
|
||||
$result = "0" unless defined($result);
|
||||
$result = mars_time() - $result if $op =~ m/-age/;
|
||||
return 0 unless $result;
|
||||
if ($op =~ m/-age/) {
|
||||
$result = mars_time() - $result;
|
||||
$result = 0 if $result < 0;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
if (/^is[-_]?split([-_]?brain)?$/) {
|
||||
|
Loading…
Reference in New Issue
Block a user