pidl:NDR/Parser.pm: update ndr_pull->relative_highest_offset after handling relative...
[ira/wip.git] / 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") {
-                       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;