Clear buffer before querying the registry in SYSPARAMS_Load.

This commit is contained in:
Felix Nawothnig 2005-07-06 11:11:17 +00:00 committed by Alexandre Julliard
parent 6b6d937c89
commit cbe914c472
1 changed files with 1 additions and 0 deletions

View File

@ -461,6 +461,7 @@ static BOOL SYSPARAMS_Load( LPCWSTR lpRegKey, LPCWSTR lpValName, LPWSTR lpBuf, D
if ((RegOpenKeyW( get_volatile_regkey(), lpRegKey, &hKey ) == ERROR_SUCCESS) ||
(RegOpenKeyW( HKEY_CURRENT_USER, lpRegKey, &hKey ) == ERROR_SUCCESS))
{
memset( lpBuf, 0, count );
ret = !RegQueryValueExW( hKey, lpValName, NULL, &type, (LPBYTE)lpBuf, &count);
RegCloseKey( hKey );
}