mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 12:20:07 +00:00
regedit: Interpret REG_DWORD as unsigned in editor.
This commit is contained in:
parent
dfe4747b1e
commit
0674e61955
@ -107,8 +107,8 @@ 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 ? "%d" : "%x", &val)) return FALSE;
|
||||
wsprintf(buf, toHex ? "%lx" : "%ld", val);
|
||||
if (!_stscanf(buf, toHex ? "%u" : "%x", &val)) return FALSE;
|
||||
wsprintf(buf, toHex ? "%x" : "%u", val);
|
||||
return SetDlgItemText(hwndDlg, IDC_VALUE_DATA, buf);
|
||||
}
|
||||
|
||||
@ -305,10 +305,10 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR valueName)
|
||||
else error_code_messagebox(hwnd, lRet);
|
||||
}
|
||||
} else if ( type == REG_DWORD ) {
|
||||
wsprintf(stringValueData, isDecimal ? "%ld" : "%lx", *((DWORD*)stringValueData));
|
||||
wsprintf(stringValueData, isDecimal ? "%u" : "%x", *((DWORD*)stringValueData));
|
||||
if (DialogBox(0, MAKEINTRESOURCE(IDD_EDIT_DWORD), hwnd, modify_dlgproc) == IDOK) {
|
||||
DWORD val;
|
||||
if (_stscanf(stringValueData, isDecimal ? "%d" : "%x", &val)) {
|
||||
if (_stscanf(stringValueData, isDecimal ? "%u" : "%x", &val)) {
|
||||
lRet = RegSetValueEx(hKey, valueName, 0, type, (BYTE*)&val, sizeof(val));
|
||||
if (lRet == ERROR_SUCCESS) result = TRUE;
|
||||
else error_code_messagebox(hwnd, lRet);
|
||||
|
Loading…
Reference in New Issue
Block a user