cast to 'unsigned long' before using ~ if we need an unsigned long result

Submitted by: "Stefan Marxen" <stefan.marxen@gmx.net>
This commit is contained in:
Bodo Möller 2001-11-09 12:58:05 +00:00
parent 45582d1e2b
commit b955dbd325

View File

@ -105,9 +105,9 @@ int ASN1_STRING_set_default_mask_asc(char *p)
mask = strtoul(p + 5, &end, 0);
if(*end) return 0;
} else if(!strcmp(p, "nombstr"))
mask = ~(B_ASN1_BMPSTRING|B_ASN1_UTF8STRING);
mask = ~((unsigned long)(B_ASN1_BMPSTRING|B_ASN1_UTF8STRING));
else if(!strcmp(p, "pkix"))
mask = ~B_ASN1_T61STRING;
mask = ~((unsigned long)B_ASN1_T61STRING);
else if(!strcmp(p, "utf8only")) mask = B_ASN1_UTF8STRING;
else if(!strcmp(p, "default"))
mask = 0xFFFFFFFFL;