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.
This commit is contained in:
Rob Shearman 2007-09-17 09:46:22 +01:00 committed by Alexandre Julliard
parent f7fbfc7da5
commit 9a28119dd8
1 changed files with 4 additions and 2 deletions

View File

@ -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))
{