mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 19:26:05 +00:00
Didn't notice that bufferSize is used by RegQueryValueEx. Now we count in
bytes with bufferSize and count in chars just in the subscript. Noticed by Christoph_Vw svn path=/trunk/; revision=36424
This commit is contained in:
@@ -243,7 +243,7 @@ StartScreenSaver(
|
||||
HKEY hKey = NULL;
|
||||
WCHAR szApplicationName[MAX_PATH];
|
||||
WCHAR szCommandLine[MAX_PATH + 3];
|
||||
DWORD bufferSize = (sizeof(szApplicationName) / sizeof(WCHAR)) - 1;
|
||||
DWORD bufferSize = sizeof(szApplicationName) - sizeof(WCHAR);
|
||||
DWORD dwType;
|
||||
STARTUPINFOW StartupInfo;
|
||||
PROCESS_INFORMATION ProcessInformation;
|
||||
@@ -280,7 +280,7 @@ StartScreenSaver(
|
||||
if (bufferSize == 0)
|
||||
goto cleanup;
|
||||
|
||||
szApplicationName[bufferSize] = 0; /* Terminate the string */
|
||||
szApplicationName[bufferSize / sizeof(WCHAR)] = 0; /* Terminate the string */
|
||||
|
||||
if (wcslen(szApplicationName) == 0)
|
||||
goto cleanup;
|
||||
|
||||
Reference in New Issue
Block a user