From 3be549fa4d1518455d78ca009efa623ce2d3909d Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 20 Jul 2011 17:06:30 +0200 Subject: Fix bug in counting length of empty composite types --- lib/asn1/c_src/asn1_erl_nif.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/asn1/c_src/asn1_erl_nif.c') diff --git a/lib/asn1/c_src/asn1_erl_nif.c b/lib/asn1/c_src/asn1_erl_nif.c index 432148295e..1a1ec09c39 100644 --- a/lib/asn1/c_src/asn1_erl_nif.c +++ b/lib/asn1/c_src/asn1_erl_nif.c @@ -1056,6 +1056,7 @@ int ber_encode(ErlNifEnv *env, ERL_NIF_TERM term, mem_chunk_t **curr, unsigned i if (enif_is_empty_list(env, tv[1])) { *((*curr)->curr) = 0; (*curr)->curr -= 1; + (*count)++; break; } else return ASN1_ERROR; -- cgit v1.2.3