From 6840f2eb0c39561681ade19060621a4c4dc270bb Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 27 Apr 2024 11:06:31 +0200 Subject: db-wagenreihung: fix warning if start_percentage == 0 --- bin/db-wagenreihung | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin/db-wagenreihung') 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 ) { -- cgit v1.2.3