aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826>2007-07-23 09:58:25 +0000
committervlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826>2007-07-23 09:58:25 +0000
commit76d6f3762b7de417c3f6bf5368a966036f0002eb (patch)
tree005580138231d4fc8638094b680b6e25a69af055
parentd024d0bc569f52c46b4fc39cac991cd6e691d9c6 (diff)
proper going over elements
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1386 59561ff5-6e30-0410-9f3c-9617f08c8826
-rw-r--r--skeletons/constr_SEQUENCE.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/skeletons/constr_SEQUENCE.c b/skeletons/constr_SEQUENCE.c
index 0cfcdade..db3c9258 100644
--- a/skeletons/constr_SEQUENCE.c
+++ b/skeletons/constr_SEQUENCE.c
@@ -1360,12 +1360,16 @@ SEQUENCE_encode_uper(asn_TYPE_descriptor_t *td,
* Encode the sequence ROOT elements.
*/
ASN_DEBUG("ext_after = %d, ec = %d, eb = %d", specs->ext_after, td->elements_count, specs->ext_before);
- for(edx = 0; edx < ((specs->ext_before < 0)
- ? td->elements_count : specs->ext_after); edx++) {
+ for(edx = 0; edx < ((specs->ext_after < 0)
+ ? td->elements_count : specs->ext_before - 1); edx++) {
+
asn_TYPE_member_t *elm = &td->elements[edx];
void *memb_ptr; /* Pointer to the member */
void **memb_ptr2; /* Pointer to that pointer */
+ if(IN_EXTENSION_GROUP(specs, edx))
+ continue;
+
ASN_DEBUG("About to encode %s", elm->type->name);
/* Fetch the pointer to this member */
@@ -1388,6 +1392,7 @@ SEQUENCE_encode_uper(asn_TYPE_descriptor_t *td,
if(elm->default_value && elm->default_value(0, memb_ptr2) == 1)
continue;
+ ASN_DEBUG("Encoding %s->%s", td->name, elm->name);
er = elm->type->uper_encoder(elm->type, elm->per_constraints,
*memb_ptr2, po);
if(er.encoded == -1)