]> mj.ucw.cz Git - pciids.git/commitdiff
Avoid warnings about uninitialized variables
authorMartin Mares <mj@ucw.cz>
Sat, 5 Feb 2011 19:37:04 +0000 (20:37 +0100)
committerMichal 'vorner' Vaner <vorner@ucw.cz>
Sat, 5 Feb 2011 20:13:14 +0000 (21:13 +0100)
PciIds/Html/Format.pm

index 41d121a52c59b7992b765578bef750e4e2ed286d..daf5007c8a3495facbb90fd4186cff65492dd597 100644 (file)
@@ -43,7 +43,9 @@ sub htmlFormatTable( $$$$$$ ) {
                        } else {
                                $func = \&encode;
                        }
-                       my $data = &{$func}( $line->[ $i ] );
+                       my $item = $line->[ $i ];
+                       $item = "" unless( defined( $item ) );
+                       my $data = &{$func}( $item );
                        $data = "" unless( defined( $data ) );
                        print $header.$data;
                }