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
1 changed files with 7 additions and 2 deletions

View File

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