regedit: Use zero as a REG_DWORD/REG_QWORD default if edit control is empty.

This commit is contained in:
Hugh McMaster 2022-07-28 14:53:49 +10:00 committed by Alexandre Julliard
parent cf9e6b3b22
commit e604f3e2ef

View file

@ -235,6 +235,8 @@ static INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT msg, WPARAM wpar
break;
case IDOK:
params = (struct edit_params *)GetWindowLongPtrW(hwndDlg, DWLP_USER);
if (!SendDlgItemMessageW(hwndDlg, IDC_VALUE_DATA, EM_LINELENGTH, 0, 0))
SetDlgItemTextW(hwndDlg, IDC_VALUE_DATA, L"0");
ret = update_registry_value(hwndDlg, params);
/* fall through */
case IDCANCEL: