From f95bf7c618416347633f60065788a9ea1a4ef07b Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 22 Dec 2010 15:56:36 +0000 Subject: [PATCH] [egg] Don't try to encode optional sequences if empty. --- egg/egg-asn1x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/egg/egg-asn1x.c b/egg/egg-asn1x.c index ba0a398..122cedf 100644 --- a/egg/egg-asn1x.c +++ b/egg/egg-asn1x.c @@ -1617,6 +1617,8 @@ anode_encode_prepare_structured (GNode *node, gboolean want) if (type == TYPE_SEQUENCE_OF || type == TYPE_SET_OF) child_want = FALSE; + if (anode_def_flags (node) & FLAG_OPTION) + want = FALSE; for (child = node->children; child; child = child->next) { if (anode_encode_prepare (child, child_want)) { -- 2.7.4