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
b3b0ddb8
Commit
b3b0ddb8
authored
Apr 03, 2002
by
Huw D M Davies
Committed by
Alexandre Julliard
Apr 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix off by one error in HEADER_InsertItemW.
parent
bc23ae6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
header.c
dlls/comctl32/header.c
+21
-10
No files found.
dlls/comctl32/header.c
View file @
b3b0ddb8
...
...
@@ -958,19 +958,26 @@ HEADER_InsertItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr
->
uNumItem
++
;
infoPtr
->
items
=
COMCTL32_Alloc
(
sizeof
(
HEADER_ITEM
)
*
infoPtr
->
uNumItem
);
/* pre insert copy */
if
(
nItem
>
0
)
{
memcpy
(
&
infoPtr
->
items
[
0
],
&
oldItems
[
0
],
nItem
*
sizeof
(
HEADER_ITEM
));
if
(
nItem
==
0
)
{
memcpy
(
&
infoPtr
->
items
[
1
],
&
oldItems
[
0
],
(
infoPtr
->
uNumItem
-
1
)
*
sizeof
(
HEADER_ITEM
));
}
else
{
/* pre insert copy */
if
(
nItem
>
0
)
{
memcpy
(
&
infoPtr
->
items
[
0
],
&
oldItems
[
0
],
nItem
*
sizeof
(
HEADER_ITEM
));
}
/* post insert copy */
if
(
nItem
<
infoPtr
->
uNumItem
-
1
)
{
memcpy
(
&
infoPtr
->
items
[
nItem
+
1
],
&
oldItems
[
nItem
],
(
infoPtr
->
uNumItem
-
nItem
)
*
sizeof
(
HEADER_ITEM
));
/* post insert copy */
if
(
nItem
<
infoPtr
->
uNumItem
-
1
)
{
memcpy
(
&
infoPtr
->
items
[
nItem
+
1
],
&
oldItems
[
nItem
],
(
infoPtr
->
uNumItem
-
nItem
-
1
)
*
sizeof
(
HEADER_ITEM
));
}
}
COMCTL32_Free
(
oldItems
);
COMCTL32_Free
(
oldItems
);
}
lpItem
=
(
HEADER_ITEM
*
)
&
infoPtr
->
items
[
nItem
];
...
...
@@ -998,6 +1005,10 @@ HEADER_InsertItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
lpItem
->
fmt
==
0
)
lpItem
->
fmt
=
HDF_LEFT
;
if
(
!
(
lpItem
->
fmt
&
HDF_STRING
)
&&
(
phdi
->
mask
&
HDI_TEXT
))
{
lpItem
->
fmt
|=
HDF_STRING
;
}
if
(
phdi
->
mask
&
HDI_BITMAP
)
lpItem
->
hbm
=
phdi
->
hbm
;
...
...
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