mirror of
https://github.com/reactos/reactos.git
synced 2025-02-21 16:04:57 +00:00
[WIDL] Fix type offset calculation for toplevel pointers to non-basetypes.
WIDL used the wrong type information when a pointer to a non-basetype is used as a functions parameter. For example, a 'wchar_t**' would be treated as a 'wchar_t*'. This patch will be sent upstream.
This commit is contained in:
parent
bfd8a84865
commit
d2540090d3
1 changed files with 2 additions and 1 deletions
|
@ -3639,6 +3639,7 @@ static unsigned int write_type_tfs(FILE *file, int indent,
|
|||
case TGT_POINTER:
|
||||
{
|
||||
enum type_context ref_context;
|
||||
unsigned int toplevel_offset = *typeformat_offset;
|
||||
type_t *ref = type_pointer_get_ref(type);
|
||||
|
||||
if (context == TYPE_CONTEXT_TOPLEVELPARAM)
|
||||
|
@ -3656,7 +3657,7 @@ static unsigned int write_type_tfs(FILE *file, int indent,
|
|||
offset = write_type_tfs(file, indent, attrs, ref, name, ref_context, typeformat_offset);
|
||||
if (context == TYPE_CONTEXT_CONTAINER_NO_POINTERS)
|
||||
return 0;
|
||||
return offset;
|
||||
return (context == TYPE_CONTEXT_TOPLEVELPARAM) ? toplevel_offset : offset;
|
||||
}
|
||||
|
||||
offset = write_type_tfs( file, indent, attrs, type_pointer_get_ref(type), name,
|
||||
|
|
Loading…
Reference in a new issue