extensibility shall not change the type from wide to narrow
diff --git a/libasn1compiler/asn1c_misc.c b/libasn1compiler/asn1c_misc.c
index 6ffd1f0..f74fbeb 100644
--- a/libasn1compiler/asn1c_misc.c
+++ b/libasn1compiler/asn1c_misc.c
@@ -359,9 +359,13 @@
*/
range = asn1constraint_compute_PER_range(expr->expr_type,
expr->combined_constraints, ACT_EL_RANGE, 0, 0, 0);
+
if(!range
+ /* Commenting out
+ || range->extensible
+ * because this may or may not indicate wide type.
+ */
|| range->empty_constraint
- || range->extensible
|| range->incompatible
|| range->not_PER_visible
) {
@@ -379,7 +383,7 @@
&& left.value >= 0
&& right.type == ARE_VALUE
&& right.value > 2147483647
- && (unsigned long)right.value <= 4294967295UL)
+ && right.value <= 4294967295UL)
return FL_FITS_UNSIGN;