aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_imm.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-01-22 17:25:09 +0100
committerBjörn Gustavsson <[email protected]>2013-01-23 15:22:56 +0100
commitf16f43446a04c459486356c0b4ad517cc9201895 (patch)
tree62f35292fab66f098f1b288418429a4c17010eef /lib/asn1/src/asn1ct_imm.erl
parentdc17110cd88153a74900d71d35df608f5d58c0f3 (diff)
downloadotp-f16f43446a04c459486356c0b4ad517cc9201895.tar.gz
otp-f16f43446a04c459486356c0b4ad517cc9201895.tar.bz2
otp-f16f43446a04c459486356c0b4ad517cc9201895.zip
per,uper: Optimize decoding of the remaining data types
Diffstat (limited to 'lib/asn1/src/asn1ct_imm.erl')
-rw-r--r--lib/asn1/src/asn1ct_imm.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl
index 87eadac073..5bdaed8f4f 100644
--- a/lib/asn1/src/asn1ct_imm.erl
+++ b/lib/asn1/src/asn1ct_imm.erl
@@ -391,6 +391,8 @@ opt_al({'case',Cs0}, A0) ->
opt_al({map,E0,Cs}, A0) ->
{E,A} = opt_al(E0, A0),
{{map,E,Cs},A};
+opt_al('NULL'=Null, A) ->
+ {Null,A};
opt_al(I, A) when is_integer(I) ->
{I,A}.
@@ -478,6 +480,8 @@ flatten({map,E0,Cs0}, Buf0, St0) ->
{Dst,St2} = new_var("Int", St1),
Cs = flatten_map_cs(Cs0, E),
{{Dst,DstBuf},Pre++[{'map',E,Cs,{Dst,DstBuf}}],St2};
+flatten({value,'NULL'}, Buf0, St0) ->
+ {{"'NULL'",Buf0},[],St0};
flatten({value,V0}, Buf0, St0) when is_integer(V0) ->
{{V0,Buf0},[],St0};
flatten({value,V0}, Buf0, St0) ->