pidl:NDR/Parser.pm: update ndr_pull->relative_highest_offset after handling relative...
authorStefan Metzmacher <metze@samba.org>
Fri, 20 Nov 2009 11:11:41 +0000 (12:11 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 20 Nov 2009 12:48:36 +0000 (13:48 +0100)
metze

pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm

index 11a43b4509dc8b762a1e78b7c3e63fd0aed59163..d598989fad202a0889985ec688b5d0486fc6d1de 100644 (file)
@@ -1053,7 +1053,12 @@ sub ParseElementPullLevel
                $self->ParseMemCtxPullEnd($e, $l, $ndr);
 
                if ($l->{POINTER_TYPE} ne "ref") {
                $self->ParseMemCtxPullEnd($e, $l, $ndr);
 
                if ($l->{POINTER_TYPE} ne "ref") {
-                       if ($l->{POINTER_TYPE} eq "relative") {
+                       if ($l->{POINTER_TYPE} eq "relative") {
+                               $self->pidl("if ($ndr->offset > $ndr->relative_highest_offset) {");
+                               $self->indent;
+                               $self->pidl("$ndr->relative_highest_offset = $ndr->offset;");
+                               $self->deindent;
+                               $self->pidl("}");
                                $self->pidl("$ndr->offset = _relative_save_offset;");
                        }
                        $self->deindent;
                                $self->pidl("$ndr->offset = _relative_save_offset;");
                        }
                        $self->deindent;