Commit 0d88ba9e authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

widl: Check whether an expression is a constant one before assuming it is a…

widl: Check whether an expression is a constant one before assuming it is a toplevel conformance when writing conformance or variance descriptors.
parent c65d16e9
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment