Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f9c40c37
Commit
f9c40c37
authored
Apr 18, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: If number of VT_VECTOR elements is 0 there is no need to allocate memory.
parent
d68c13a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
ole2.c
dlls/ole32/ole2.c
+1
-1
propvariant.c
dlls/ole32/tests/propvariant.c
+0
-1
No files found.
dlls/ole32/ole2.c
View file @
f9c40c37
...
@@ -3143,7 +3143,7 @@ HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, /* [out] */
...
@@ -3143,7 +3143,7 @@ HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, /* [out] */
return
E_INVALIDARG
;
return
E_INVALIDARG
;
}
}
len
=
pvarSrc
->
u
.
capropvar
.
cElems
;
len
=
pvarSrc
->
u
.
capropvar
.
cElems
;
pvarDest
->
u
.
capropvar
.
pElems
=
CoTaskMemAlloc
(
len
*
elemSize
)
;
pvarDest
->
u
.
capropvar
.
pElems
=
len
?
CoTaskMemAlloc
(
len
*
elemSize
)
:
NULL
;
if
(
pvarSrc
->
vt
==
(
VT_VECTOR
|
VT_VARIANT
))
if
(
pvarSrc
->
vt
==
(
VT_VECTOR
|
VT_VARIANT
))
{
{
for
(
i
=
0
;
i
<
len
;
i
++
)
for
(
i
=
0
;
i
<
len
;
i
++
)
...
...
dlls/ole32/tests/propvariant.c
View file @
f9c40c37
...
@@ -263,7 +263,6 @@ static void test_validtypes(void)
...
@@ -263,7 +263,6 @@ static void test_validtypes(void)
{
{
ok
(
copy
.
vt
==
propvar
.
vt
,
"expected %d, got %d
\n
"
,
propvar
.
vt
,
copy
.
vt
);
ok
(
copy
.
vt
==
propvar
.
vt
,
"expected %d, got %d
\n
"
,
propvar
.
vt
,
copy
.
vt
);
ok
(
!
U
(
copy
).
caub
.
cElems
,
"%u: expected 0, got %d
\n
"
,
i
,
U
(
copy
).
caub
.
cElems
);
ok
(
!
U
(
copy
).
caub
.
cElems
,
"%u: expected 0, got %d
\n
"
,
i
,
U
(
copy
).
caub
.
cElems
);
todo_wine
ok
(
!
U
(
copy
).
caub
.
pElems
,
"%u: expected NULL, got %p
\n
"
,
i
,
U
(
copy
).
caub
.
pElems
);
ok
(
!
U
(
copy
).
caub
.
pElems
,
"%u: expected NULL, got %p
\n
"
,
i
,
U
(
copy
).
caub
.
pElems
);
}
}
else
else
...
...
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