cope with array index name attr being undef
Tim Bunce [Sun, 30 Sep 2012 08:16:37 +0000 (17:16 +0900)]
bin/sizeme_store.pl

index 4acd962..515a782 100755 (executable)
@@ -104,11 +104,11 @@ sub enter_node {
                     $names[0] = '@_';
                     \@names;
                 };
-                $x->{name} = $padnames->[$index] || "?";
+                $x->{name} = (defined $index and $padnames->[$index]) || "?";
                 $x->{name} =~ s/my\(SVs_PADTMP\)/PADTMP/; # XXX hack for neatness
             }
             else {
-                $x->{name} = "[$index]";
+                $x->{name} = "[$index]" if defined $index;
             }
         }
     }