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
436145e9
Commit
436145e9
authored
Feb 06, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Feb 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix nGrow initialization in DPA_CreateEx.
parent
163396b9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
comctl32undoc.c
dlls/comctl32/comctl32undoc.c
+1
-1
dpa.c
dlls/comctl32/tests/dpa.c
+12
-0
No files found.
dlls/comctl32/comctl32undoc.c
View file @
436145e9
...
@@ -2195,7 +2195,7 @@ DPA_CreateEx (INT nGrow, HANDLE hHeap)
...
@@ -2195,7 +2195,7 @@ DPA_CreateEx (INT nGrow, HANDLE hHeap)
hdpa
=
Alloc
(
sizeof
(
*
hdpa
));
hdpa
=
Alloc
(
sizeof
(
*
hdpa
));
if
(
hdpa
)
{
if
(
hdpa
)
{
hdpa
->
nGrow
=
m
in
(
8
,
nGrow
);
hdpa
->
nGrow
=
m
ax
(
8
,
nGrow
);
hdpa
->
hHeap
=
hHeap
?
hHeap
:
GetProcessHeap
();
hdpa
->
hHeap
=
hHeap
?
hHeap
:
GetProcessHeap
();
hdpa
->
nMaxCount
=
hdpa
->
nGrow
*
2
;
hdpa
->
nMaxCount
=
hdpa
->
nGrow
*
2
;
hdpa
->
ptrs
=
HeapAlloc
(
hdpa
->
hHeap
,
HEAP_ZERO_MEMORY
,
hdpa
->
ptrs
=
HeapAlloc
(
hdpa
->
hHeap
,
HEAP_ZERO_MEMORY
,
...
...
dlls/comctl32/tests/dpa.c
View file @
436145e9
...
@@ -30,6 +30,9 @@
...
@@ -30,6 +30,9 @@
#include "wine/test.h"
#include "wine/test.h"
static
HDPA
(
WINAPI
*
pDPA_Create
)(
int
);
static
HDPA
(
WINAPI
*
pDPA_Create
)(
int
);
static
BOOL
(
WINAPI
*
pDPA_Grow
)(
const
HDPA
hdpa
,
INT
nGrow
);
static
BOOL
(
WINAPI
*
pDPA_Destroy
)(
const
HDPA
hdpa
);
static
BOOL
(
WINAPI
*
pDPA_SetPtr
)(
const
HDPA
hdpa
,
INT
i
,
LPVOID
p
);
static
INT
CALLBACK
dpa_strcmp
(
LPVOID
pvstr1
,
LPVOID
pvstr2
,
LPARAM
flags
)
static
INT
CALLBACK
dpa_strcmp
(
LPVOID
pvstr1
,
LPVOID
pvstr2
,
LPARAM
flags
)
{
{
...
@@ -56,6 +59,12 @@ void DPA_test()
...
@@ -56,6 +59,12 @@ void DPA_test()
ok
((
int_ret
==
0
),
"DPA_Search proposed bad item
\n
"
);
ok
((
int_ret
==
0
),
"DPA_Search proposed bad item
\n
"
);
int_ret
=
DPA_Search
(
dpa_ret
,
test_str0
,
0
,
dpa_strcmp
,
0
,
DPAS_SORTED
|
DPAS_INSERTAFTER
);
int_ret
=
DPA_Search
(
dpa_ret
,
test_str0
,
0
,
dpa_strcmp
,
0
,
DPAS_SORTED
|
DPAS_INSERTAFTER
);
ok
((
int_ret
==
0
),
"DPA_Search proposed bad item
\n
"
);
ok
((
int_ret
==
0
),
"DPA_Search proposed bad item
\n
"
);
int_ret
=
pDPA_Grow
(
dpa_ret
,
0
);
ok
(
int_ret
!=
0
,
"DPA_Grow failed
\n
"
);
int_ret
=
pDPA_SetPtr
(
dpa_ret
,
0
,
(
void
*
)
0xdeadbeef
);
ok
(
int_ret
!=
0
,
"DPA_SetPtr failed
\n
"
);
int_ret
=
pDPA_Destroy
(
dpa_ret
);
ok
(
int_ret
!=
0
,
"DPA_Destory failed
\n
"
);
}
}
START_TEST
(
dpa
)
START_TEST
(
dpa
)
...
@@ -64,6 +73,9 @@ START_TEST(dpa)
...
@@ -64,6 +73,9 @@ START_TEST(dpa)
hdll
=
GetModuleHandleA
(
"comctl32.dll"
);
hdll
=
GetModuleHandleA
(
"comctl32.dll"
);
pDPA_Create
=
(
void
*
)
GetProcAddress
(
hdll
,(
LPCSTR
)
328
);
pDPA_Create
=
(
void
*
)
GetProcAddress
(
hdll
,(
LPCSTR
)
328
);
pDPA_Destroy
=
(
void
*
)
GetProcAddress
(
hdll
,(
LPCSTR
)
329
);
pDPA_Grow
=
(
void
*
)
GetProcAddress
(
hdll
,(
LPCSTR
)
330
);
pDPA_SetPtr
=
(
void
*
)
GetProcAddress
(
hdll
,(
LPCSTR
)
335
);
DPA_test
();
DPA_test
();
}
}
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