summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r--lib/Travel/Status/DE/HAFAS/Services.pm.PL6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/Services.pm.PL b/lib/Travel/Status/DE/HAFAS/Services.pm.PL
index 00038e5..ae6a754 100644
--- a/lib/Travel/Status/DE/HAFAS/Services.pm.PL
+++ b/lib/Travel/Status/DE/HAFAS/Services.pm.PL
@@ -40,12 +40,16 @@ sub load_instance {
}
}
+ my $skipped = 0;
for my $bit ( 0 .. 15 ) {
if ( my $p = $bitmask_to_product{ 2**$bit } ) {
+ for ( 1 .. $skipped ) {
+ push( @{ $ret{productbits} }, [ "_", undef ] );
+ }
push( @{ $ret{productbits} }, [ $p->{id}, $p->{name} ] );
}
else {
- push( @{ $ret{productbits} }, [ "_", undef ] );
+ $skipped += 1;
}
}