aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_constructed_per.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-01-07 14:37:00 +0100
committerBjörn Gustavsson <[email protected]>2013-01-07 15:39:49 +0100
commit9a0754b4d051eb75547da790fadef962b67a512e (patch)
tree4cb1a929359c7be28d750ab269c06350ac7b34f5 /lib/asn1/src/asn1ct_constructed_per.erl
parent3c05d3389f8b45e5b9f13a874de53ec521981a41 (diff)
downloadotp-9a0754b4d051eb75547da790fadef962b67a512e.tar.gz
otp-9a0754b4d051eb75547da790fadef962b67a512e.tar.bz2
otp-9a0754b4d051eb75547da790fadef962b67a512e.zip
Fix a bug for multiple extension addition groups
Encoding would fail.
Diffstat (limited to 'lib/asn1/src/asn1ct_constructed_per.erl')
-rw-r--r--lib/asn1/src/asn1ct_constructed_per.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1ct_constructed_per.erl b/lib/asn1/src/asn1ct_constructed_per.erl
index 8de41a4dd4..5de29a9c77 100644
--- a/lib/asn1/src/asn1ct_constructed_per.erl
+++ b/lib/asn1/src/asn1ct_constructed_per.erl
@@ -112,7 +112,10 @@ gen_encode_constructed(Erule,Typename,D) when is_record(D,type) ->
emit([
{next,val}," = case [X || X <- [",Elements,
"],X =/= asn1_NOVALUE] of",nl,
- "[] -> ",{curr,val},";",nl,
+ "[] -> setelement(",
+ {asis,ExtActualGroupPos+1},",",
+ {curr,val},",",
+ "asn1_NOVALUE);",nl,
"_ -> setelement(",{asis,ExtActualGroupPos+1},",",
{curr,val},",",
"{extaddgroup,", Elements,"})",nl,