From 9cb7670e7f23a97fdc207c66bd7872ffb11ddb90 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 6 Jul 2011 11:03:39 +0200 Subject: Cannot be a binary as decode creates tuples --- lib/asn1/c_src/asn1_erl_nif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 e9f67636cc..7ce461ad5c 100644 --- a/lib/asn1/c_src/asn1_erl_nif.c +++ b/lib/asn1/c_src/asn1_erl_nif.c @@ -965,7 +965,7 @@ int decode_value(ErlNifEnv* env, ERL_NIF_TERM *value, unsigned char *in_buf, (*ib_index)++; if (indef == 1) { /* in this case it is desireably to check that indefinite length end bytes exist in inbuffer */ - curr_head = enif_make_list(env, 0); // Might want to change this list to a binary + curr_head = enif_make_list(env, 0); while (!(in_buf[*ib_index] == 0 && in_buf[*ib_index + 1] == 0)) { if (*ib_index >= in_buf_len) return ASN1_INDEF_LEN_ERROR; @@ -983,7 +983,7 @@ int decode_value(ErlNifEnv* env, ERL_NIF_TERM *value, unsigned char *in_buf, int end_index = *ib_index + len; if (end_index > in_buf_len) return ASN1_LEN_ERROR; - curr_head = enif_make_list(env, 0); // might want to change this list to a binary + curr_head = enif_make_list(env, 0); while (*ib_index < end_index) { if ((maybe_ret = decode(env, &term, in_buf, ib_index, in_buf_len)) -- cgit v1.2.3