Commit f1308f9b authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

kernel32: Set last error to ERROR_FILE_NOT_FOUND if lpAppName is NULL.

parent 287b07fd
......@@ -1446,8 +1446,7 @@ BOOL WINAPI WritePrivateProfileStringW( LPCWSTR section, LPCWSTR entry,
else if (PROFILE_Open( filename, TRUE ))
{
if (!section) {
FIXME("(NULL?,%s,%s,%s)?\n",
debugstr_w(entry), debugstr_w(string), debugstr_w(filename));
SetLastError(ERROR_FILE_NOT_FOUND);
} else {
ret = PROFILE_SetString( section, entry, string, FALSE);
PROFILE_FlushFile();
......
......@@ -855,11 +855,8 @@ static void test_WritePrivateProfileString(void)
SetLastError(0xdeadbeef);
ret = WritePrivateProfileStringA(NULL, "key", "string", path);
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
todo_wine
{
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
}
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
ok(check_file_data(path, data), "File doesn't match\n");
DeleteFileA(path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment