Commit 75d8081d authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

regedit: Grow the buffer when modifying a DWORD value.

parent 9491a5e5
...@@ -283,7 +283,9 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName) ...@@ -283,7 +283,9 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName)
} }
} else if ( type == REG_DWORD ) { } else if ( type == REG_DWORD ) {
static const WCHAR x[] = {'%','x',0}; 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) { if (DialogBoxW(0, MAKEINTRESOURCEW(IDD_EDIT_DWORD), hwnd, modify_dlgproc) == IDOK) {
DWORD val; DWORD val;
CHAR* valueA = GetMultiByteString(stringValueData); CHAR* valueA = GetMultiByteString(stringValueData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment