Commit 8e750b0e authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

widl: Include range types in constant BufferLength calculation for server function.

parent 03f87bc1
......@@ -216,11 +216,13 @@ enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *att
switch (type_get_type(type))
{
case TYPE_BASIC:
if (is_attr(attrs, ATTR_RANGE) || is_aliaschain_attr(type, ATTR_RANGE))
if (!(flags & TDT_IGNORE_RANGES) &&
(is_attr(attrs, ATTR_RANGE) || is_aliaschain_attr(type, ATTR_RANGE)))
return TGT_RANGE;
return TGT_BASIC;
case TYPE_ENUM:
if (is_attr(attrs, ATTR_RANGE) || is_aliaschain_attr(type, ATTR_RANGE))
if (!(flags & TDT_IGNORE_RANGES) &&
(is_attr(attrs, ATTR_RANGE) || is_aliaschain_attr(type, ATTR_RANGE)))
return TGT_RANGE;
return TGT_ENUM;
case TYPE_POINTER:
......@@ -3012,7 +3014,7 @@ static unsigned int get_required_buffer_size_type(
const type_t *type, const char *name, const attr_list_t *attrs, int toplevel_param, unsigned int *alignment)
{
*alignment = 0;
switch (typegen_detect_type(type, NULL, TDT_IGNORE_STRINGS))
switch (typegen_detect_type(type, NULL, TDT_IGNORE_STRINGS|TDT_IGNORE_RANGES))
{
case TGT_USER_TYPE:
{
......
......@@ -40,6 +40,7 @@ enum typegen_detect_flags
{
TDT_ALL_TYPES = 1 << 0,
TDT_IGNORE_STRINGS = 1 << 1,
TDT_IGNORE_RANGES = 1 << 2,
};
enum typegen_type
......
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