Code was checking for 0 or HFILE_ERROR instead of negative error

values.
This commit is contained in:
Andreas Mohr 2001-01-02 19:56:21 +00:00 committed by Alexandre Julliard
parent 97d5abcd04
commit 50ea1101c8
2 changed files with 3 additions and 3 deletions

View File

@ -359,7 +359,7 @@ DWORD WINAPI VerInstallFileA(
else pdest = destdir;
sprintf(destfn,"%s\\%s",pdest,destfilename);
hfsrc=LZOpenFileA(srcfn,&ofs,OF_READ);
if (hfsrc==HFILE_ERROR)
if (hfsrc < 0)
return VIF_CANNOTREADSRC;
sprintf(tmpfn,"%s\\%s",pdest,destfilename);
tmplast=strlen(pdest)+1;

View File

@ -386,7 +386,7 @@ DWORD WINAPI GetFileResourceSize16( LPCSTR lpszFileName, LPCSTR lpszResType,
lpszResId );
lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ );
if ( !lzfd ) return 0;
if ( lzfd < 0 ) return 0;
switch ( read_xx_header( lzfd ) )
{
@ -423,7 +423,7 @@ DWORD WINAPI GetFileResource16( LPCSTR lpszFileName, LPCSTR lpszResType,
dwFileOffset, dwResLen, lpvData );
lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ );
if ( lzfd == 0 ) return 0;
if ( lzfd < 0 ) return 0;
if ( !dwFileOffset )
{