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
2fbe9cf2
Commit
2fbe9cf2
authored
Sep 25, 2002
by
Paul Rupe
Committed by
Alexandre Julliard
Sep 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resize dynamic pointer array more carefully when adding new entries.
parent
80be53ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
comctl32undoc.c
dlls/comctl32/comctl32undoc.c
+3
-6
No files found.
dlls/comctl32/comctl32undoc.c
View file @
2fbe9cf2
...
...
@@ -1957,11 +1957,7 @@ DPA_SetPtr (const HDPA hdpa, INT i, LPVOID p)
if
(
hdpa
->
nItemCount
<=
i
)
{
/* within the old array */
if
(
hdpa
->
nMaxCount
>
i
)
{
/* within the allocated space, set a new boundary */
hdpa
->
nItemCount
=
i
+
1
;
}
else
{
if
(
hdpa
->
nMaxCount
<=
i
)
{
/* resize the block of memory */
INT
nNewItems
=
hdpa
->
nGrow
*
((
INT
)(((
i
+
1
)
-
1
)
/
hdpa
->
nGrow
)
+
1
);
...
...
@@ -1972,9 +1968,10 @@ DPA_SetPtr (const HDPA hdpa, INT i, LPVOID p)
if
(
!
lpTemp
)
return
FALSE
;
hdpa
->
n
Item
Count
=
nNewItems
;
hdpa
->
n
Max
Count
=
nNewItems
;
hdpa
->
ptrs
=
lpTemp
;
}
hdpa
->
nItemCount
=
i
+
1
;
}
/* put the new entry in */
...
...
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