mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
widl: Check whether an expression is a constant one before assuming it is a toplevel conformance when writing conformance or variance descriptors.
This commit is contained in:
parent
c65d16e9d5
commit
0d88ba9e01
@ -985,16 +985,6 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *structure,
|
||||
return 4;
|
||||
}
|
||||
|
||||
if (!structure)
|
||||
{
|
||||
/* Top-level conformance calculations are done inline. */
|
||||
print_file (file, 2, "0x%x,\t/* Corr desc: parameter */\n",
|
||||
RPC_FC_TOP_LEVEL_CONFORMANCE);
|
||||
print_file (file, 2, "0x0,\n");
|
||||
print_file (file, 2, "NdrFcShort(0x0),\n");
|
||||
return 4;
|
||||
}
|
||||
|
||||
if (expr->is_const)
|
||||
{
|
||||
if (expr->cval > UCHAR_MAX * (USHRT_MAX + 1) + USHRT_MAX)
|
||||
@ -1010,6 +1000,16 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *structure,
|
||||
return 4;
|
||||
}
|
||||
|
||||
if (!structure)
|
||||
{
|
||||
/* Top-level conformance calculations are done inline. */
|
||||
print_file (file, 2, "0x%x,\t/* Corr desc: parameter */\n",
|
||||
RPC_FC_TOP_LEVEL_CONFORMANCE);
|
||||
print_file (file, 2, "0x0,\n");
|
||||
print_file (file, 2, "NdrFcShort(0x0),\n");
|
||||
return 4;
|
||||
}
|
||||
|
||||
if (is_ptr(type) || (is_array(type) && type_array_is_decl_as_ptr(type)))
|
||||
{
|
||||
conftype = RPC_FC_POINTER_CONFORMANCE;
|
||||
|
Loading…
Reference in New Issue
Block a user