Handle section==NULL (error) in WritePrivateProfileStringA.

This commit is contained in:
Marcus Meissner 2002-01-21 23:36:53 +00:00 committed by Alexandre Julliard
parent 77e7fd7a24
commit 4589a07499

View file

@ -1480,8 +1480,13 @@ BOOL WINAPI WritePrivateProfileStringA( LPCSTR section, LPCSTR entry,
{
if (!section && !entry && !string) /* documented "file flush" case */
PROFILE_ReleaseFile(); /* always return FALSE in this case */
else
ret = PROFILE_SetString( section, entry, string );
else {
if (!section) {
FIXME("(NULL?,%s,%s,%s)? \n",entry,string,filename);
} else {
ret = PROFILE_SetString( section, entry, string );
}
}
}
LeaveCriticalSection( &PROFILE_CritSect );