asn1: Better handling of >63 named bits/ints
First, we enlarge Member's val field to int64_t. Then we warn about skipping 2int, int2, and parse units glue for such things with too-large members. And we error out when generating the template for such things with >UINT32_MAX members. What about too-negative members? That could be a thing for INTEGER / ENUMERATED. We'll look at that later.
This commit is contained in:
@@ -226,7 +226,7 @@ encode_type (const char *name, const Type *t, const char *tmpstr)
|
||||
fprintf (codefile,
|
||||
"if((%s)->%s) {\n"
|
||||
"c |= 1<<%d;\n",
|
||||
name, m->gen_name, 7 - m->val % 8);
|
||||
name, m->gen_name, (int)(7 - m->val % 8));
|
||||
fprintf (codefile,
|
||||
"}\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user