Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
30b516b8
Commit
30b516b8
authored
Jan 02, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Use structure size instead of hardcoded values.
parent
f88d7bc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
typelib2.c
dlls/oleaut32/typelib2.c
+4
-3
No files found.
dlls/oleaut32/typelib2.c
View file @
30b516b8
...
...
@@ -1976,7 +1976,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc(
insert
=
alloc_cyclic_list_item
(
CyclicListFunc
);
if
(
!
insert
)
return
E_OUTOFMEMORY
;
insert
->
u
.
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
int
[
6
])
+
sizeof
(
int
[(
num_defaults
?
4
:
3
)])
*
pFuncDesc
->
cParams
);
insert
->
u
.
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
FIELD_OFFSET
(
MSFT_FuncRecord
,
HelpContext
)
+
sizeof
(
int
[(
num_defaults
?
4
:
3
)])
*
pFuncDesc
->
cParams
);
if
(
!
insert
->
u
.
data
)
{
HeapFree
(
GetProcessHeap
(),
0
,
insert
);
return
E_OUTOFMEMORY
;
...
...
@@ -1984,7 +1985,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc(
/* fill out the basic type information */
typedata
=
insert
->
u
.
data
;
typedata
[
0
]
=
0x18
+
pFuncDesc
->
cParams
*
(
num_defaults
?
16
:
12
);
typedata
[
0
]
=
FIELD_OFFSET
(
MSFT_FuncRecord
,
HelpContext
)
+
pFuncDesc
->
cParams
*
(
num_defaults
?
16
:
12
);
ctl2_encode_typedesc
(
This
->
typelib
,
&
pFuncDesc
->
elemdescFunc
.
tdesc
,
&
typedata
[
1
],
NULL
,
NULL
,
&
decoded_size
);
typedata
[
2
]
=
pFuncDesc
->
wFuncFlags
;
typedata
[
3
]
=
((
sizeof
(
FUNCDESC
)
+
decoded_size
)
<<
16
)
|
(
unsigned
short
)(
pFuncDesc
->
oVft
?
pFuncDesc
->
oVft
+
1
:
0
);
...
...
@@ -2048,7 +2049,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc(
}
/* update type data size */
This
->
typedata
->
next
->
u
.
val
+=
0x18
+
pFuncDesc
->
cParams
*
(
num_defaults
?
16
:
12
);
This
->
typedata
->
next
->
u
.
val
+=
FIELD_OFFSET
(
MSFT_FuncRecord
,
HelpContext
)
+
pFuncDesc
->
cParams
*
(
num_defaults
?
16
:
12
);
/* Increment the number of function elements */
This
->
typeinfo
->
cElement
+=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment