pidl-wireshark: insure that we have an entire match for the variable name
authorMatthieu Patou <mat@matws.net>
Thu, 3 Oct 2013 16:45:19 +0000 (09:45 -0700)
committerStefan Metzmacher <metze@samba.org>
Thu, 9 Oct 2014 22:32:40 +0000 (00:32 +0200)
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Oct 10 00:32:40 CEST 2014 on sn-devel-104

pidl/lib/Parse/Pidl/Wireshark/NDR.pm

index aa434d8ad1aa6e5981c53bf79058b45efcf142d3..10eaa6c95ec22a935ea83883c326b9f89073357a 100644 (file)
@@ -624,7 +624,7 @@ sub Struct($$$$)
                my $switch_info = undef;
 
                my $v = $_->{NAME};
-               if (scalar(grep {/$v/} keys(%$varswitchs)) == 1) {
+               if (scalar(grep {/^$v$/} keys(%$varswitchs)) == 1) {
                        # This element is one of the switch attribute
                        my $switch_dt =  getType($_->{TYPE});
                        my $switch_type;