From dc62ee73443a3259f696c059c3888cce6b06bffd Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 31 Jul 2010 18:30:33 +0200 Subject: Fix --exclude argument validation --- bin/efa | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/efa b/bin/efa index 1062a5e..b96d7d4 100755 --- a/bin/efa +++ b/bin/efa @@ -147,20 +147,20 @@ sub opt_exclude { zug s-bahn u-bahn stadtbahn tram stadtbus regionalbus schnellbus seilbahn schiff ast sonstige /; - my $ok = 0; my (undef, $str) = @_; my @exclude = split(/,/, $str); foreach my $exclude_type (@exclude) { + my $ok = 0; for my $map_id (0 .. $#mapping) { if ($exclude_type eq $mapping[$map_id]) { $post{"inclMOT_$map_id"} = undef; $ok = 1; } } - } - if (not $ok) { - die("exclude: Invalid argument.\n"); + if (not $ok) { + die("exclude: Invalid argument: $exclude_type\n"); + } } } -- cgit v1.2.3