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
789cf283
Commit
789cf283
authored
Apr 14, 2022
by
Hugh McMaster
Committed by
Alexandre Julliard
Apr 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Use wide character string literals in edit.c.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6b6d084b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
edit.c
programs/regedit/edit.c
+3
-7
No files found.
programs/regedit/edit.c
View file @
789cf283
...
...
@@ -85,15 +85,12 @@ static void WINAPIV error_code_messagebox(HWND hwnd, unsigned int msg_id, ...)
static
BOOL
change_dword_base
(
HWND
hwndDlg
,
BOOL
toHex
)
{
static
const
WCHAR
percent_u
[]
=
{
'%'
,
'u'
,
0
};
static
const
WCHAR
percent_x
[]
=
{
'%'
,
'x'
,
0
};
WCHAR
buf
[
128
];
DWORD
val
;
if
(
!
GetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_DATA
,
buf
,
ARRAY_SIZE
(
buf
)))
return
FALSE
;
if
(
!
swscanf
(
buf
,
toHex
?
percent_u
:
percent_x
,
&
val
))
return
FALSE
;
wsprintfW
(
buf
,
toHex
?
percent_x
:
percent_u
,
val
);
if
(
!
swscanf
(
buf
,
toHex
?
L"%u"
:
L"%x"
,
&
val
))
return
FALSE
;
wsprintfW
(
buf
,
toHex
?
L"%x"
:
L"%u"
,
val
);
return
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_DATA
,
buf
);
}
...
...
@@ -281,10 +278,9 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName)
else
error_code_messagebox
(
hwnd
,
IDS_SET_VALUE_FAILED
);
}
}
else
if
(
type
==
REG_DWORD
)
{
static
const
WCHAR
x
[]
=
{
'%'
,
'x'
,
0
};
DWORD
value
=
*
((
DWORD
*
)
stringValueData
);
stringValueData
=
heap_xrealloc
(
stringValueData
,
64
);
wsprintfW
(
stringValueData
,
x
,
value
);
wsprintfW
(
stringValueData
,
L"%x"
,
value
);
if
(
DialogBoxW
(
0
,
MAKEINTRESOURCEW
(
IDD_EDIT_DWORD
),
hwnd
,
modify_dlgproc
)
==
IDOK
)
{
DWORD
val
;
CHAR
*
valueA
=
GetMultiByteString
(
stringValueData
);
...
...
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