regedit: Grow the buffer when modifying a DWORD value.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=19098
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 75d8081dc6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Alistair Leslie-Hughes 2019-03-20 21:53:19 +00:00 committed by Michael Stefaniuc
parent c26d4c91cd
commit a5079be68f
1 changed files with 3 additions and 1 deletions

View File

@ -283,7 +283,9 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName)
}
} else if ( type == REG_DWORD ) {
static const WCHAR x[] = {'%','x',0};
wsprintfW(stringValueData, x, *((DWORD*)stringValueData));
DWORD value = *((DWORD*)stringValueData);
stringValueData = heap_xrealloc(stringValueData, 64);
wsprintfW(stringValueData, x, value);
if (DialogBoxW(0, MAKEINTRESOURCEW(IDD_EDIT_DWORD), hwnd, modify_dlgproc) == IDOK) {
DWORD val;
CHAR* valueA = GetMultiByteString(stringValueData);