diff options
author | Björn Gustavsson <[email protected]> | 2013-11-29 10:24:49 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-11-29 10:48:11 +0100 |
commit | bdf9ae38e1563c8304bf411c6e0655622246b20b (patch) | |
tree | 9dbafdbb33e3389f2c93cd0ca0c28f70370424ea /lib/asn1/src | |
parent | 20641fe0f2ea745873fc7557448d3a7deb1bd639 (diff) | |
download | otp-bdf9ae38e1563c8304bf411c6e0655622246b20b.tar.gz otp-bdf9ae38e1563c8304bf411c6e0655622246b20b.tar.bz2 otp-bdf9ae38e1563c8304bf411c6e0655622246b20b.zip |
PER/UPER: Handle a range in the extension part of the constraint
Constraints such as:
INTEGER (1..10, ..., 11..20)
would fail to compile. Make sure it is properly ignored.
Diffstat (limited to 'lib/asn1/src')
-rw-r--r-- | lib/asn1/src/asn1ct_imm.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl index 892178f61b..7408255aea 100644 --- a/lib/asn1/src/asn1ct_imm.erl +++ b/lib/asn1/src/asn1ct_imm.erl @@ -2123,8 +2123,10 @@ fixup_put_bits(Other) -> per_fixup(Other). %% returns a value range that has the lower bound set to the lowest value %% of all single values and lower bound values in C and the upper bound to %% the greatest value. -effective_constraint(integer,[C={{_,_},_}|_Rest]) -> % extension - [C]; +effective_constraint(integer, [{{_,_}=Root,_}|_Rest]) -> + %% Normalize extension. Note that any range given for the + %% extension should be ignored anyway. + [{Root,[]}]; effective_constraint(integer, C) -> SVs = get_constraints(C, 'SingleValue'), SV = effective_constr('SingleValue', SVs), |