Fix regression in ASN.1 int type generation

The 64-bit integer support changed the logic for deciding when an
    INTEGER should map to a signed or unsigned 32- or 64-bit integer
    type.  The upshot is that two places where we had {0, INT_MAX}
    ranges needed to be changed to be {0, UINT_MAX}.

    We need to tweak the integer type mapping logic to have a bias for
    unsigned integer types.  Unsigned is better.
This commit is contained in:
Nicolas Williams
2011-12-15 14:37:09 -06:00
parent 4630ef1bdc
commit dd05873d0c

View File

@@ -752,7 +752,7 @@ define_type (int level, const char *name, const char *basename, Type *t, int typ
case TBitString: {
Member *m;
Type i;
struct range range = { 0, INT_MAX };
struct range range = { 0, UINT_MAX };
i.type = TInteger;
i.range = ⦥
@@ -851,7 +851,7 @@ define_type (int level, const char *name, const char *basename, Type *t, int typ
case TSetOf:
case TSequenceOf: {
Type i;
struct range range = { 0, INT_MAX };
struct range range = { 0, UINT_MAX };
getnewbasename(&newbasename, typedefp, basename, name);