pidl: for wireshark use only the major of the version
[ira/wip.git] / pidl / lib / Parse / Pidl / Wireshark / NDR.pm
index 45b6c1e5f699ee6cc0309bd7378c0e3eae9e7606..46c9850b562091b99d30e0ceccdc422f3d106a14 100644 (file)
@@ -905,16 +905,15 @@ sub ProcessInterface($$)
            . ", 0x" . substr($if_uuid, 35, 2) . " }");
            $self->pidl_def("};");
        
-           my $maj = $x->{VERSION};
+           my $maj = 0x0000FFFF & $x->{VERSION};
            $maj =~ s/\.(.*)$//g;
-           $self->pidl_def("static guint32 ver_dcerpc_$x->{NAME} = $maj;");
+           $self->pidl_def("static guint16 ver_dcerpc_$x->{NAME} = $maj;");
            $self->pidl_def("");
        }
 
        $return_types{$x->{NAME}} = {};
 
        $self->Interface($x);
-
        $self->pidl_code("\n".DumpFunctionTable($x));
 
        foreach (keys %{$return_types{$x->{NAME}}}) {