r7102: fix subcontext(0)
authorStefan Metzmacher <metze@samba.org>
Mon, 30 May 2005 11:25:26 +0000 (11:25 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:17:16 +0000 (13:17 -0500)
metze

source/build/pidl/ndr.pm

index 5fafab3cd0098478b5a32e66051fe1c580b88b16..febf292c8a3ec35716a7041059f23c5ab5967f47 100644 (file)
@@ -132,7 +132,8 @@ sub GetElementLevelTable($)
                }
        }
 
-       if (my $hdr_size = util::has_property($e, "subcontext")) {
+       if (defined(util::has_property($e, "subcontext"))) {
+               my $hdr_size = util::has_property($e, "subcontext");
                my $subsize = util::has_property($e, "subcontext_size");
                if (not defined($subsize)) { 
                        $subsize = -1; 
@@ -178,7 +179,7 @@ sub can_contain_deferred
 
        return 1 if ($e->{POINTERS});
        return 0 if (typelist::is_scalar($e->{TYPE}));
-       return 0 if (util::has_property($e, "subcontext"));
+       return 0 if (defined(util::has_property($e, "subcontext")));
        return 1 unless (typelist::hasType($e->{TYPE})); # assume the worst
 
        my $type = typelist::getType($e->{TYPE});