From 40e1a16f54c4cba02a8141361c1bd591f0907333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 4 Feb 2009 22:08:21 +0000 Subject: [PATCH] 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 --- lib/asn1/gen_decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/asn1/gen_decode.c b/lib/asn1/gen_decode.c index 70ed18db0..ee387a000 100644 --- a/lib/asn1/gen_decode.c +++ b/lib/asn1/gen_decode.c @@ -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"); }