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
c3821f6c
Commit
c3821f6c
authored
Apr 26, 2012
by
Bruno Jesus
Committed by
Alexandre Julliard
Apr 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Fix item text reading in regedit.
parent
28335fb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
listview.c
programs/regedit/listview.c
+4
-7
No files found.
programs/regedit/listview.c
View file @
c3821f6c
...
@@ -58,20 +58,17 @@ LPWSTR GetItemText(HWND hwndLV, UINT item)
...
@@ -58,20 +58,17 @@ LPWSTR GetItemText(HWND hwndLV, UINT item)
{
{
LPWSTR
newStr
,
curStr
;
LPWSTR
newStr
,
curStr
;
unsigned
int
maxLen
=
128
;
unsigned
int
maxLen
=
128
;
if
(
item
==
0
)
return
NULL
;
/* first item is ALWAYS a default */
curStr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
maxLen
*
sizeof
(
WCHAR
));
curStr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
maxLen
*
sizeof
(
WCHAR
));
if
(
!
curStr
)
return
NULL
;
if
(
!
curStr
)
return
NULL
;
if
(
item
==
0
)
{
/* first item is ALWAYS a default */
HeapFree
(
GetProcessHeap
(),
0
,
curStr
);
return
NULL
;
}
do
{
do
{
ListView_GetItemTextW
(
hwndLV
,
item
,
0
,
curStr
,
maxLen
*
sizeof
(
WCHAR
)
);
ListView_GetItemTextW
(
hwndLV
,
item
,
0
,
curStr
,
maxLen
);
if
(
lstrlenW
(
curStr
)
<
maxLen
-
1
)
return
curStr
;
if
(
lstrlenW
(
curStr
)
<
maxLen
-
1
)
return
curStr
;
newStr
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
curStr
,
maxLen
*
2
*
sizeof
(
WCHAR
));
maxLen
*=
2
;
newStr
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
curStr
,
maxLen
*
sizeof
(
WCHAR
));
if
(
!
newStr
)
break
;
if
(
!
newStr
)
break
;
curStr
=
newStr
;
curStr
=
newStr
;
maxLen
*=
2
;
}
while
(
TRUE
);
}
while
(
TRUE
);
HeapFree
(
GetProcessHeap
(),
0
,
curStr
);
HeapFree
(
GetProcessHeap
(),
0
,
curStr
);
return
NULL
;
return
NULL
;
...
...
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