kernel32: Don't try to load an empty initialization file.
This commit is contained in:
parent
7c3529f1cc
commit
87847b47cd
|
@ -322,7 +322,7 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding)
|
|||
TRACE("%p\n", hFile);
|
||||
|
||||
dwFileSize = GetFileSize(hFile, NULL);
|
||||
if (dwFileSize == INVALID_FILE_SIZE)
|
||||
if (dwFileSize == INVALID_FILE_SIZE || dwFileSize == 0)
|
||||
return NULL;
|
||||
|
||||
buffer_base = HeapAlloc(GetProcessHeap(), 0 , dwFileSize);
|
||||
|
|
|
@ -865,10 +865,7 @@ static void test_WritePrivateProfileString(void)
|
|||
"key=string\r\n";
|
||||
ret = WritePrivateProfileStringA("", "key", "string", path);
|
||||
ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
|
||||
todo_wine
|
||||
{
|
||||
ok(check_file_data(path, data), "File doesn't match\n");
|
||||
}
|
||||
DeleteFileA(path);
|
||||
|
||||
/* NULL lpKeyName */
|
||||
|
|
Loading…
Reference in New Issue