From 0a0f8b5e3a67b8577adf8ece28ed30a092d8f284 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 21 Nov 2003 22:34:45 +0000 Subject: fixed a bug with pushing non-pointer unions (This used to be commit bc2fbc79cc7c0308934f351b067a88b4b397de37) --- source4/build/pidl/parser.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/build/pidl/parser.pm') diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index c57610e9ae..2ed5fd27db 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -415,7 +415,9 @@ sub ParseElementPushSwitch($$$$) if (!defined $utype || !util::has_property($utype->{DATA}, "nodiscriminant")) { my $e2 = find_sibling($e, $switch); - pidl "\tNDR_CHECK(ndr_push_$e2->{TYPE}(ndr, $switch_var));\n"; + pidl "\tif (($ndr_flags) & NDR_SCALARS) {\n"; + pidl "\t\tNDR_CHECK(ndr_push_$e2->{TYPE}(ndr, $switch_var));\n"; + pidl "\t}\n"; } my $sub_size = util::has_property($e, "subcontext"); -- cgit