Commit 92fc0130 authored by Lev Walkin's avatar Lev Walkin Committed by GitHub

Merge pull request #168 from brchiu/fix_compile_J2735_issue

Fix compile SAE J2735_201603DA.ASN issue
parents fb35e088 94f0b645
......@@ -3005,8 +3005,6 @@ out_name_chain(arg_t *arg, enum onc_flags onc_flags) {
asn1p_expr_t *expr = arg->expr;
char *id;
assert(expr->Identifier);
if((arg->flags & A1C_COMPOUND_NAMES
|| onc_flags & ONC_force_compound_name)
&& ((expr->expr_type & ASN_CONSTR_MASK)
......@@ -3015,8 +3013,8 @@ out_name_chain(arg_t *arg, enum onc_flags onc_flags) {
|| expr->expr_type == ASN_BASIC_BIT_STRING)
&& expr_elements_count(arg, expr))
)
&& expr->parent_expr
&& expr->parent_expr->Identifier) {
&& expr->parent_expr) {
arg_t tmparg = *arg;
tmparg.expr = expr->parent_expr;
......@@ -3024,7 +3022,7 @@ out_name_chain(arg_t *arg, enum onc_flags onc_flags) {
out_name_chain(&tmparg, onc_flags);
OUT("__"); /* a separator between id components */
if(expr->parent_expr->Identifier) OUT("__"); /* a separator between id components */
/* Fall through */
}
......
......@@ -221,7 +221,7 @@ asn1c_type_name(arg_t *arg, asn1p_expr_t *expr, enum tnfmt _format) {
}
}
if(_format != TNF_RSAFE && terminal && terminal->spec_index != -1) {
if(_format != TNF_RSAFE && terminal && ((terminal->spec_index != -1) || (terminal->_mark & TM_NAMECLASH))) {
exprid = terminal;
typename = 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment