Module: wine Branch: master Commit: e604f3e2ef7d202ecfa9927d1e39706956c9d6aa URL: https://gitlab.winehq.org/wine/wine/-/commit/e604f3e2ef7d202ecfa9927d1e39706...
Author: Hugh McMaster hugh.mcmaster@outlook.com Date: Thu Jul 28 14:53:49 2022 +1000
regedit: Use zero as a REG_DWORD/REG_QWORD default if edit control is empty.
---
programs/regedit/edit.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index 79151ee1af6..181672b4da6 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -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: