diff options
-rw-r--r-- | lib/asn1/src/asn1ct_constructed_per.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/asn1/src/asn1ct_constructed_per.erl b/lib/asn1/src/asn1ct_constructed_per.erl index bcc5aee8bb..02947ed6ea 100644 --- a/lib/asn1/src/asn1ct_constructed_per.erl +++ b/lib/asn1/src/asn1ct_constructed_per.erl @@ -1248,11 +1248,15 @@ comp_call_pre_post(noext, mandatory, _, _, _, _, _, _) -> comp_call_pre_post(noext, Prop, _, _, TextPos, OptTable, NumOptionals, Ext) -> %% OPTIONAL or DEFAULT OptPos = get_optionality_pos(TextPos, OptTable), - Element = io_lib:format("Opt band (1 bsl ~w)", - [NumOptionals - OptPos]), + Element = case NumOptionals - OptPos of + 0 -> + "Opt band 1"; + Shift -> + lists:concat(["(Opt bsr ",Shift,") band 1"]) + end, {[fun(St) -> emit(["case ",Element," of",nl, - " _Opt",TextPos," when _Opt",TextPos," > 0 ->"]), + "1 ->",nl]), St end], [fun(St) -> |