aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-07-12 15:09:03 +0200
committerLukas Larsson <[email protected]>2011-08-01 16:38:50 +0200
commit043f1775872c8304c93c8e213e87d8a8f6c6dfec (patch)
tree2c84b1109b8aa7c14569aca150b3dbcba6a21b2b /lib
parentb4cc7b889e61cfb2ec42d83ccd030acc7a77c8a5 (diff)
downloadotp-043f1775872c8304c93c8e213e87d8a8f6c6dfec.tar.gz
otp-043f1775872c8304c93c8e213e87d8a8f6c6dfec.tar.bz2
otp-043f1775872c8304c93c8e213e87d8a8f6c6dfec.zip
Update tag to be ints instead of longs
This is in order to circumvent a bug in enif_make_ulong in R14B03 for halfword
Diffstat (limited to 'lib')
-rw-r--r--lib/asn1/c_src/asn1_erl_nif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asn1/c_src/asn1_erl_nif.c b/lib/asn1/c_src/asn1_erl_nif.c
index a9bf98c44a..58314e23c2 100644
--- a/lib/asn1/c_src/asn1_erl_nif.c
+++ b/lib/asn1/c_src/asn1_erl_nif.c
@@ -898,7 +898,7 @@ int decode_tag(ErlNifEnv* env, ERL_NIF_TERM *tag, unsigned char *in_buf,
/* then get the tag number */
if ((tmp_tag = (int) INVMASK(in_buf[*ib_index],ASN1_CLASSFORM)) < 31) {
- *tag = enif_make_ulong(env, tag_no + tmp_tag);
+ *tag = enif_make_uint(env, tag_no + tmp_tag);
(*ib_index)++;
} else {
int n = 0; /* n is used to check that the 64K limit is not
@@ -924,7 +924,7 @@ int decode_tag(ErlNifEnv* env, ERL_NIF_TERM *tag, unsigned char *in_buf,
return ASN1_TAG_ERROR; /* tag number > 64K */
tag_no = tag_no + in_buf[*ib_index];
(*ib_index)++;
- *tag = enif_make_ulong(env, tag_no);
+ *tag = enif_make_uint(env, tag_no);
}
return form;
}