diff options
author | Erlang/OTP <[email protected]> | 2017-08-23 10:39:25 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2017-08-23 10:39:25 +0200 |
commit | 9685b8b517438279fb647563d4f9e42c72db24da (patch) | |
tree | cf57de7391ea31ef63004f622422362a96940993 /lib/asn1/src/asn1ct_constructed_per.erl | |
parent | 73ecd4cde263c4179e774958ce9c45cb5bfc3fad (diff) | |
parent | 17884d5d2253d72b46337c42d65a38661505a808 (diff) | |
download | otp-9685b8b517438279fb647563d4f9e42c72db24da.tar.gz otp-9685b8b517438279fb647563d4f9e42c72db24da.tar.bz2 otp-9685b8b517438279fb647563d4f9e42c72db24da.zip |
Merge branch 'bjorn/asn1/broken-default-in-ext/ERIERL-60/OTP-13011' into maint-20
* bjorn/asn1/broken-default-in-ext/ERIERL-60/OTP-13011:
Bump version
Fix broken handling of default values in extensions for PER
Diffstat (limited to 'lib/asn1/src/asn1ct_constructed_per.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_constructed_per.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/asn1/src/asn1ct_constructed_per.erl b/lib/asn1/src/asn1ct_constructed_per.erl index 3f1be4febb..aff383479b 100644 --- a/lib/asn1/src/asn1ct_constructed_per.erl +++ b/lib/asn1/src/asn1ct_constructed_per.erl @@ -985,9 +985,11 @@ gen_enc_components_call1(Gen, TopType, [C|Rest], DynamicEnc, Ext) -> Imm1; 'OPTIONAL' -> enc_absent(Gen, Element, [asn1_NOVALUE], Imm1); - {'DEFAULT',Def} -> + {'DEFAULT',Def} when Ext =:= noext -> DefValues = def_values(Type, Def), - enc_absent(Gen, Element, DefValues, Imm1) + enc_absent(Gen, Element, DefValues, Imm1); + {'DEFAULT',_} -> + enc_absent(Gen, Element, [asn1_DEFAULT], Imm1) end, Imm = case Imm2 of [] -> []; |