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:
parent
a971f54816
commit
cd1a13b00e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue