From 802ac96adf90d4f8868f1a0b49cb912d4796efb8 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 5 Jul 2011 17:26:43 +0200 Subject: return 0 as error code when an unknown error happens --- lib/asn1/c_src/asn1_erl_nif.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/asn1') diff --git a/lib/asn1/c_src/asn1_erl_nif.c b/lib/asn1/c_src/asn1_erl_nif.c index 41ce504273..e9f67636cc 100644 --- a/lib/asn1/c_src/asn1_erl_nif.c +++ b/lib/asn1/c_src/asn1_erl_nif.c @@ -1021,6 +1021,8 @@ static ERL_NIF_TERM encode_per_complete(ErlNifEnv* env, int argc, if (complete_len == ASN1_ERROR ) err_code = enif_make_uint(env, '1'); + else + err_code = enif_make_uint(env, 0); return enif_make_tuple2(env, enif_make_atom(env, "error"), err_code); } if (complete_len < out_binary.size) -- cgit v1.2.3