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>
Mon, 4 Nov 2013 11:19:32 +0000 (12:19 +0100)
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
pidl/lib/Parse/Pidl/Wireshark/NDR.pm

index 8740f154ebae759dfedd5111a49eb2aab59922a8..efc41402ab264609d65384943877e94953d07e71 100644 (file)
@@ -667,7 +667,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;