asn1: Fix printing of decorated types

This commit is contained in:
Nicolas Williams
2022-03-28 16:08:39 -05:00
parent 9a47ec2b02
commit 56b60a1a40

View File

@@ -2549,7 +2549,9 @@ _asn1_print(const struct asn1_template *t,
}
default: break;
}
if (nnames)
if (nnames &&
(t->tt & A1_OP_MASK) != A1_OP_TYPE_DECORATE_EXTERN &&
(t->tt & A1_OP_MASK) != A1_OP_TYPE_DECORATE)
r = rk_strpoolprintf(r, ",%s\"%s\":",
indents ? indents : "",
(const char *)(tnames++)->ptr);