0..MAX is unsigned in constraints
diff --git a/libasn1compiler/asn1c_misc.c b/libasn1compiler/asn1c_misc.c
index 665b748..99c275b 100644
--- a/libasn1compiler/asn1c_misc.c
+++ b/libasn1compiler/asn1c_misc.c
@@ -406,6 +406,9 @@
asn1constraint_range_free(range);
/* Special case for unsigned */
+ if(!(arg->flags & A1C_USE_WIDE_TYPES) && left.type == ARE_VALUE
+ && left.value >= 0 && left.value <= 2147483647 && right.type == ARE_MAX)
+ return FL_FITS_UNSIGN;
if(left.type == ARE_VALUE
&& left.value >= 0
&& right.type == ARE_VALUE