If using the default values, also set dwType to REG_SZ as our default

strings don't need to be expanded (found by Valgrind).
This commit is contained in:
Francois Gouget 2003-11-20 04:21:12 +00:00 committed by Alexandre Julliard
parent a971f54816
commit cd1a13b00e
1 changed files with 2 additions and 0 deletions

View File

@ -1089,6 +1089,7 @@ BOOL WINAPI SHGetSpecialFolderPathA (
strcpy(szPath, "C:\\"); /* FIXME ??? */
strcat(szPath, szDefaultPath);
}
dwType=REG_SZ;
RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1);
}
}
@ -1125,6 +1126,7 @@ BOOL WINAPI SHGetSpecialFolderPathA (
strcpy(szPath, "C:\\"); /* FIXME ??? */
strcat(szPath, szDefaultPath);
}
dwType=REG_SZ;
RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1);
}
RegCloseKey(hKey);