aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-05-15 15:24:04 +0200
committerBjörn Gustavsson <[email protected]>2015-01-12 11:40:24 +0100
commit56ab55449e38de8b28df5e2b7e3e6bbebfecd1ba (patch)
tree5dd44bafddb815cab2a2c37defabeb9aafe211ed /lib/asn1/src
parentb92e491aa5bfbaefb0f938bbb245a580837cb8c8 (diff)
downloadotp-56ab55449e38de8b28df5e2b7e3e6bbebfecd1ba.tar.gz
otp-56ab55449e38de8b28df5e2b7e3e6bbebfecd1ba.tar.bz2
otp-56ab55449e38de8b28df5e2b7e3e6bbebfecd1ba.zip
Use object_to_check/1 in two forgotten places
An #'Externavaluereference'{} may either be a value or an object. In places where objects are expected, we will need to call object_to_check/1 to convert an #'Externavaluereference'{} to an object. It was forgotten in two places.
Diffstat (limited to 'lib/asn1/src')
-rw-r--r--lib/asn1/src/asn1ct_check.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index fc15cfbb88..79d55feb9f 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -794,7 +794,7 @@ check_object(S,_ObjDef,#'Object'{classname=ClassRef,def=ObjectDef}) ->
instantiate_po(S,ClassDef,Object,ArgList);
#'Externalvaluereference'{} ->
{_,Object} = get_referenced_type(S,ObjectDef),
- check_object(S,Object,Object#typedef.typespec);
+ check_object(S, Object, object_to_check(Object));
[] ->
%% An object with no fields. All class fields must be
%% optional or default. Check that all fields in
@@ -835,8 +835,7 @@ check_object(S,
{'SingleValue',ERef = #'Externalvaluereference'{}} ->
{RefedMod,ObjDef} = get_referenced_type(S,ERef),
#'Object'{def=CheckedObj} =
- check_object(S,ObjDef,ObjDef#typedef.typespec),
-
+ check_object(S, ObjDef, object_to_check(ObjDef)),
NewSet = get_unique_valuelist(S,[{{RefedMod,get_datastr_name(ObjDef)},
CheckedObj}],
UniqueInfo),