Return HFILE_ERROR instead of -1 in _lread.

This commit is contained in:
Francois Gouget 2004-01-16 21:23:32 +00:00 committed by Alexandre Julliard
parent 49906feb23
commit 1614f91767

View File

@ -258,7 +258,8 @@ HFILE WINAPI _lopen( LPCSTR path, INT mode )
UINT WINAPI _lread( HFILE handle, LPVOID buffer, UINT count )
{
DWORD result;
if (!ReadFile( (HANDLE)handle, buffer, count, &result, NULL )) return -1;
if (!ReadFile( (HANDLE)handle, buffer, count, &result, NULL ))
return HFILE_ERROR;
return result;
}