choice tagging fix

git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@598 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
vlm 2005-01-17 12:27:41 +00:00
parent 0000d302b4
commit a88c7ddbd9
3 changed files with 14 additions and 2 deletions

View File

@ -44,6 +44,8 @@ asn1f_fetch_tags_impl(arg_t *arg, struct asn1p_type_tag_s **tags, int count, int
if(expr->expr_type == ASN_TYPE_ANY
&& (flags & AFT_IMAGINARY_ANY))
tt.tag_value = -1;
else if(expr->expr_type == ASN_CONSTR_CHOICE)
return count ? count : -1;
else
return -1;
}

View File

@ -14,7 +14,8 @@ BEGIN
T ::= CHOICE {
s1 T1-ext,
s2 T2,
s3 T3
s3 T3,
s4 T4
}
T1-ext ::= SEQUENCE {
@ -37,4 +38,8 @@ BEGIN
m2 [1] BOOLEAN
}
T4 ::= [53] CHOICE {
m1 [1] IMPLICIT OCTET STRING
}
END

View File

@ -7,7 +7,8 @@ BEGIN
T ::= CHOICE {
s1 T1-ext,
s2 T2,
s3 T3
s3 T3,
s4 T4
}
T1-ext ::= SEQUENCE {
@ -30,4 +31,8 @@ T3 ::= SET {
m2 [1] IMPLICIT BOOLEAN
}
T4 ::= [53] EXPLICIT CHOICE {
m1 [1] IMPLICIT OCTET STRING
}
END