r5785: Fix subcontext pushes
[samba.git] / source4 / build / pidl / ndr.pm
index 1e862f5c231602203687004bec2cc14ad07679b1..0d021f8daa3779b70587dda00e7bf6aa4a732f28 100644 (file)
@@ -549,7 +549,7 @@ sub ParseArrayPull($$$$)
        my $size = $length;
 
        if (is_conformant_array($e)) {
-               $size = "ndr_get_array_size($ndr, &$var_prefix$e->{NAME})";
+               $length = $size = "ndr_get_array_size($ndr, &$var_prefix$e->{NAME})";
        }
 
        # if this is a conformant array then we use that size to allocate, and make sure
@@ -920,7 +920,7 @@ sub ParseElementPushBuffer($$)
                        ParseSwitchPush($e, $ndr, $var_prefix, $ndr_flags, $switch);
                }
 
-               pidl "NDR_CHECK(ndr_push_$e->{TYPE}(ndr, $ndr_flags, $cprefix$var_prefix$e->{NAME}));";
+               pidl "NDR_CHECK(ndr_push_$e->{TYPE}($ndr, $ndr_flags, $cprefix$var_prefix$e->{NAME}));";
        }
 
        if (defined $sub_size) {