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
cc5e9106
Commit
cc5e9106
authored
Oct 09, 2006
by
Gerald Pfeifer
Committed by
Alexandre Julliard
Oct 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
programs/regedit: Fix format specifiers for _stscanf and fprintf.
parent
82379f22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
edit.c
programs/regedit/edit.c
+2
-2
regedit.c
programs/regedit/regedit.c
+1
-1
No files found.
programs/regedit/edit.c
View file @
cc5e9106
...
...
@@ -107,7 +107,7 @@ static BOOL change_dword_base(HWND hwndDlg, BOOL toHex)
DWORD
val
;
if
(
!
GetDlgItemText
(
hwndDlg
,
IDC_VALUE_DATA
,
buf
,
COUNT_OF
(
buf
)))
return
FALSE
;
if
(
!
_stscanf
(
buf
,
toHex
?
"%
ld"
:
"%l
x"
,
&
val
))
return
FALSE
;
if
(
!
_stscanf
(
buf
,
toHex
?
"%
d"
:
"%
x"
,
&
val
))
return
FALSE
;
wsprintf
(
buf
,
toHex
?
"%lx"
:
"%ld"
,
val
);
return
SetDlgItemText
(
hwndDlg
,
IDC_VALUE_DATA
,
buf
);
}
...
...
@@ -308,7 +308,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR valueName)
wsprintf
(
stringValueData
,
isDecimal
?
"%ld"
:
"%lx"
,
*
((
DWORD
*
)
stringValueData
));
if
(
DialogBox
(
0
,
MAKEINTRESOURCE
(
IDD_EDIT_DWORD
),
hwnd
,
modify_dlgproc
)
==
IDOK
)
{
DWORD
val
;
if
(
_stscanf
(
stringValueData
,
isDecimal
?
"%
ld"
:
"%l
x"
,
&
val
))
{
if
(
_stscanf
(
stringValueData
,
isDecimal
?
"%
d"
:
"%
x"
,
&
val
))
{
lRet
=
RegSetValueEx
(
hKey
,
valueName
,
0
,
type
,
(
BYTE
*
)
&
val
,
sizeof
(
val
));
if
(
lRet
==
ERROR_SUCCESS
)
result
=
TRUE
;
else
error_code_messagebox
(
hwnd
,
lRet
);
...
...
programs/regedit/regedit.c
View file @
cc5e9106
...
...
@@ -177,7 +177,7 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
}
if
(
size
==
0
)
{
fprintf
(
stderr
,
"%s: File not found
\"
%s
\"
(%
l
d)
\n
"
,
fprintf
(
stderr
,
"%s: File not found
\"
%s
\"
(%d)
\n
"
,
getAppName
(),
filename
,
GetLastError
());
exit
(
1
);
}
...
...
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