diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-04-27 11:06:31 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-04-27 11:06:31 +0200 |
commit | 6840f2eb0c39561681ade19060621a4c4dc270bb (patch) | |
tree | 59cb5f3a7dc4dd1f9e8b1f2fa865c8140d5f72b9 | |
parent | 210149a9c387fc0ac5bbab796bf3928e816c3783 (diff) |
db-wagenreihung: fix warning if start_percentage == 0
-rwxr-xr-x | bin/db-wagenreihung | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/db-wagenreihung b/bin/db-wagenreihung index 291cc9f..b095d59 100755 --- a/bin/db-wagenreihung +++ b/bin/db-wagenreihung @@ -106,7 +106,9 @@ for my $section ( $wr->sections ) { print "\n"; my @start_percentages = map { $_->{position}{start_percent} } $wr->wagons; -print ' ' x ( ( min @start_percentages ) - 1 ); +if ( my $min_percentage = min @start_percentages ) { + print ' ' x ( $min_percentage - 1 ); +} print $wr->direction == 100 ? '>' : '<'; for my $wagon ( $wr->wagons ) { |