diff options
author | Björn Gustavsson <[email protected]> | 2014-01-20 15:31:21 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-01-24 16:24:55 +0100 |
commit | 4bda9201055daf3abbdb5ef48bbdd0efacfd1fbc (patch) | |
tree | 1696fdc27de1f5d13ec15826919edaef372f3819 /lib/asn1/src/asn1ct_gen_per.erl | |
parent | bd9e8cf011ee6c1391c134287f0fe877e51c54b8 (diff) | |
download | otp-4bda9201055daf3abbdb5ef48bbdd0efacfd1fbc.tar.gz otp-4bda9201055daf3abbdb5ef48bbdd0efacfd1fbc.tar.bz2 otp-4bda9201055daf3abbdb5ef48bbdd0efacfd1fbc.zip |
Fix BIT STRING
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_per.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_gen_per.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl index 7ba649c874..1885f782bd 100644 --- a/lib/asn1/src/asn1ct_gen_per.erl +++ b/lib/asn1/src/asn1ct_gen_per.erl @@ -132,7 +132,14 @@ gen_encode_prim_imm(Val, #type{def=Type0,constraint=Constraint}, Aligned) -> ToBinary = {real_common,encode_real}, asn1ct_imm:per_enc_restricted_string(Val, ToBinary, Aligned); {'BIT STRING',NNL} -> - asn1ct_imm:per_enc_bit_string(Val, NNL, Constraint, Aligned); + case asn1ct:use_legacy_types() of + false -> + asn1ct_imm:per_enc_bit_string(Val, NNL, + Constraint, Aligned); + true -> + asn1ct_imm:per_enc_legacy_bit_string(Val, NNL, + Constraint, Aligned) + end; 'NULL' -> asn1ct_imm:per_enc_null(Val, Aligned); 'OBJECT IDENTIFIER' -> |