aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1compiler
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2006-09-17 06:31:08 +0000
committerLev Walkin <vlm@lionet.info>2006-09-17 06:31:08 +0000
commit8c2ca0b088227144033705990ca2c1be1d9d2f17 (patch)
treef5167bb2e48164dc37298cfe83825a7820923e82 /libasn1compiler
parenta9532f4d2bad200422ffacae45342c73f7cb40cb (diff)
XER reference types encoding error
Diffstat (limited to 'libasn1compiler')
-rw-r--r--libasn1compiler/asn1c_C.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libasn1compiler/asn1c_C.c b/libasn1compiler/asn1c_C.c
index 3ebd4179..18879d18 100644
--- a/libasn1compiler/asn1c_C.c
+++ b/libasn1compiler/asn1c_C.c
@@ -2193,9 +2193,12 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
*/
static int
emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_count, int all_tags_count, int elements_count, enum etd_spec spec) {
+ asn1p_expr_t *terminal;
int using_type_name = 0;
char *p = MKID(expr);
+ terminal = asn1f_find_terminal_type_ex(arg->asn, expr);
+
if((arg->flags & A1C_GEN_PER)
&& (expr->constraints
|| expr->expr_type == ASN_BASIC_ENUMERATED
@@ -2255,7 +2258,8 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_
"use \"-gen-PER\" to enable */\n");
}
- if(expr->expr_type == ASN_CONSTR_CHOICE) {
+ if(!terminal || terminal->expr_type == ASN_CONSTR_CHOICE) {
+ //if(expr->expr_type == ASN_CONSTR_CHOICE) {
OUT("CHOICE_outmost_tag,\n");
} else {
OUT("0,\t/* Use generic outmost tag fetcher */\n");