Alistair Leslie-Hughes leslie_alistair@hotmail.com writes:
@@ -282,8 +282,12 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName) else error_code_messagebox(hwnd, IDS_SET_VALUE_FAILED); } } else if ( type == REG_DWORD ) {
WCHAR buffer[256]; static const WCHAR x[] = {'%','x',0};
wsprintfW(stringValueData, x, *((DWORD*)stringValueData));
DWORD value = *((DWORD*)stringValueData);
heap_free(stringValueData);
stringValueData = buffer;
This can't work, it needs to be allocated on the heap.