Commit 9a28119d authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

widl: Fix write_string_tfs for strings declared as arrays.

The immediate type will be FC_*ARRAY, so rtype needs to use the referred type to get the base type. Also update the typeformat-string offset of the type.
parent f7fbfc7d
......@@ -1341,12 +1341,14 @@ static int is_declptr(const type_t *t)
}
static size_t write_string_tfs(FILE *file, const attr_list_t *attrs,
const type_t *type,
type_t *type,
const char *name, unsigned int *typestring_offset)
{
size_t start_offset = *typestring_offset;
unsigned char rtype;
update_tfsoff(type, start_offset, file);
if (is_declptr(type))
{
unsigned char flag = is_conformant_array(type) ? 0 : RPC_FC_P_SIMPLEPOINTER;
......@@ -1365,7 +1367,7 @@ static size_t write_string_tfs(FILE *file, const attr_list_t *attrs,
rtype = type->ref->type;
}
else
rtype = type->type;
rtype = type->ref->type;
if ((rtype != RPC_FC_BYTE) && (rtype != RPC_FC_CHAR) && (rtype != RPC_FC_WCHAR))
{
......
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