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
208f631c
Commit
208f631c
authored
Jun 24, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Remove unnecessary string conversion when modifying REG_DWORD value.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
3b1faf59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
edit.c
programs/regedit/edit.c
+9
-9
No files found.
programs/regedit/edit.c
View file @
208f631c
...
@@ -284,16 +284,16 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName)
...
@@ -284,16 +284,16 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName)
DWORD
value
=
*
((
DWORD
*
)
stringValueData
);
DWORD
value
=
*
((
DWORD
*
)
stringValueData
);
stringValueData
=
heap_xrealloc
(
stringValueData
,
64
);
stringValueData
=
heap_xrealloc
(
stringValueData
,
64
);
wsprintfW
(
stringValueData
,
L"%x"
,
value
);
wsprintfW
(
stringValueData
,
L"%x"
,
value
);
if
(
DialogBoxW
(
0
,
MAKEINTRESOURCEW
(
IDD_EDIT_DWORD
),
hwnd
,
modify_dlgproc
)
==
IDOK
)
{
if
(
DialogBoxW
(
0
,
MAKEINTRESOURCEW
(
IDD_EDIT_DWORD
),
hwnd
,
modify_dlgproc
)
==
IDOK
)
DWORD
val
;
{
CHAR
*
valueA
=
GetMultiByteString
(
stringValueData
);
DWORD
val
;
if
(
sscanf
(
valueA
,
isDecimal
?
"%lu"
:
"%lx"
,
&
val
))
{
if
(
swscanf
(
stringValueData
,
isDecimal
?
L"%lu"
:
L"%lx"
,
&
val
))
lRet
=
RegSetValueExW
(
hKey
,
valueName
,
0
,
type
,
(
BYTE
*
)
&
val
,
sizeof
(
val
));
{
if
(
lRet
==
ERROR_SUCCESS
)
result
=
TRUE
;
lRet
=
RegSetValueExW
(
hKey
,
valueName
,
0
,
type
,
(
BYTE
*
)
&
val
,
sizeof
(
val
));
if
(
lRet
==
ERROR_SUCCESS
)
result
=
TRUE
;
else
error_code_messagebox
(
hwnd
,
IDS_SET_VALUE_FAILED
);
else
error_code_messagebox
(
hwnd
,
IDS_SET_VALUE_FAILED
);
}
}
heap_free
(
valueA
);
}
}
}
else
if
(
type
==
REG_QWORD
)
{
}
else
if
(
type
==
REG_QWORD
)
{
UINT64
value
=
*
((
UINT64
*
)
stringValueData
);
UINT64
value
=
*
((
UINT64
*
)
stringValueData
);
stringValueData
=
heap_xrealloc
(
stringValueData
,
64
);
stringValueData
=
heap_xrealloc
(
stringValueData
,
64
);
...
...
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