Commit e5086e3f authored by Lev Walkin's avatar Lev Walkin

extensibility shall not change the type from wide to narrow

parent 58b74eb5
......@@ -705,7 +705,7 @@ native_long_sign(asn1cnst_range_t *r) {
&& r->left.value >= 0
&& r->right.type == ARE_VALUE
&& r->right.value > 2147483647
&& (unsigned long)r->right.value <= 4294967295UL) {
&& r->right.value <= 4294967295UL) {
if(r->el_count == 0
&& r->left.value == 0
&& r->right.value == 4294967295UL)
......
......@@ -359,9 +359,13 @@ asn1c_type_fits_long(arg_t *arg, asn1p_expr_t *expr) {
*/
range = asn1constraint_compute_PER_range(expr->expr_type,
expr->combined_constraints, ACT_EL_RANGE, 0, 0, 0);
if(!range
|| range->empty_constraint
/* Commenting out
|| range->extensible
* because this may or may not indicate wide type.
*/
|| range->empty_constraint
|| range->incompatible
|| range->not_PER_visible
) {
......@@ -379,7 +383,7 @@ asn1c_type_fits_long(arg_t *arg, asn1p_expr_t *expr) {
&& left.value >= 0
&& right.type == ARE_VALUE
&& right.value > 2147483647
&& (unsigned long)right.value <= 4294967295UL)
&& right.value <= 4294967295UL)
return FL_FITS_UNSIGN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment