Check that decoding worked before before checking is its a primitive

type or constructed type.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24603 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-02-04 22:08:21 +00:00
parent 31fb2759da
commit 40e1a16f54

View File

@@ -516,7 +516,7 @@ decode_type (const char *name, const Type *t, int optional,
ide = typestring;
} else {
fprintf(codefile,
"if (%s != %s) { e = ASN1_BAD_ID; }\n",
"if (e == 0 && %s != %s) { e = ASN1_BAD_ID; }\n",
typestring, is_primitive_type(t->subtype->type) ? "PRIM" : "CONS");
}