From ab22b4b3d45717831c4f5ce82de2e0705d0735d4 Mon Sep 17 00:00:00 2001 From: Dan Hipschman Date: Mon, 25 Jun 2007 18:23:33 -0700 Subject: [PATCH] widl: Check for user types when calculating buffer size. --- tools/widl/typegen.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index bb998fc7734..8dedd8d6ddf 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2101,7 +2101,13 @@ static unsigned int get_required_buffer_size_type( size_t size = 0; *alignment = 0; - if (!is_ptr(type)) + if (is_user_type(type)) + { + const char *uname; + const type_t *utype = get_user_type(type, &uname); + size = get_required_buffer_size_type(utype, uname, alignment); + } + else if (!is_ptr(type)) { switch (type->type) {