pidl-wireshark: insure that we have an entire match for the variable name
[metze/samba/wip.git] / 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;