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
c7718d31
Commit
c7718d31
authored
May 28, 2018
by
Hugh McMaster
Committed by
Alexandre Julliard
May 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Pass NULL instead of the address of an empty WCHAR.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cc200d0a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
edit.c
programs/regedit/edit.c
+2
-4
No files found.
programs/regedit/edit.c
View file @
c7718d31
...
...
@@ -192,9 +192,8 @@ static LPWSTR read_value(HWND hwnd, HKEY hKey, LPCWSTR valueName, DWORD *lpType,
DWORD
valueDataLen
;
LPWSTR
buffer
=
NULL
;
LONG
lRet
;
WCHAR
empty
=
0
;
lRet
=
RegQueryValueExW
(
hKey
,
valueName
?
valueName
:
&
empty
,
0
,
lpType
,
0
,
&
valueDataLen
);
lRet
=
RegQueryValueExW
(
hKey
,
valueName
,
NULL
,
lpType
,
NULL
,
&
valueDataLen
);
if
(
lRet
)
{
if
(
lRet
==
ERROR_FILE_NOT_FOUND
&&
!
valueName
)
{
/* no default value here, make it up */
if
(
len
)
*
len
=
1
;
...
...
@@ -413,12 +412,11 @@ BOOL DeleteValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName)
BOOL
result
=
FALSE
;
LONG
lRet
;
HKEY
hKey
;
WCHAR
empty
=
0
;
lRet
=
RegOpenKeyExW
(
hKeyRoot
,
keyPath
,
0
,
KEY_READ
|
KEY_SET_VALUE
,
&
hKey
);
if
(
lRet
)
return
FALSE
;
lRet
=
RegDeleteValueW
(
hKey
,
valueName
?
valueName
:
&
empty
);
lRet
=
RegDeleteValueW
(
hKey
,
valueName
);
if
(
lRet
&&
valueName
)
{
error_code_messagebox
(
hwnd
,
IDS_BAD_VALUE
,
valueName
);
}
...
...
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