Commit 50ea1101 authored by Andreas Mohr's avatar Andreas Mohr Committed by Alexandre Julliard

Code was checking for 0 or HFILE_ERROR instead of negative error

values.
parent 97d5abcd
...@@ -359,7 +359,7 @@ DWORD WINAPI VerInstallFileA( ...@@ -359,7 +359,7 @@ DWORD WINAPI VerInstallFileA(
else pdest = destdir; else pdest = destdir;
sprintf(destfn,"%s\\%s",pdest,destfilename); sprintf(destfn,"%s\\%s",pdest,destfilename);
hfsrc=LZOpenFileA(srcfn,&ofs,OF_READ); hfsrc=LZOpenFileA(srcfn,&ofs,OF_READ);
if (hfsrc==HFILE_ERROR) if (hfsrc < 0)
return VIF_CANNOTREADSRC; return VIF_CANNOTREADSRC;
sprintf(tmpfn,"%s\\%s",pdest,destfilename); sprintf(tmpfn,"%s\\%s",pdest,destfilename);
tmplast=strlen(pdest)+1; tmplast=strlen(pdest)+1;
......
...@@ -386,7 +386,7 @@ DWORD WINAPI GetFileResourceSize16( LPCSTR lpszFileName, LPCSTR lpszResType, ...@@ -386,7 +386,7 @@ DWORD WINAPI GetFileResourceSize16( LPCSTR lpszFileName, LPCSTR lpszResType,
lpszResId ); lpszResId );
lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ ); lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ );
if ( !lzfd ) return 0; if ( lzfd < 0 ) return 0;
switch ( read_xx_header( lzfd ) ) switch ( read_xx_header( lzfd ) )
{ {
...@@ -423,7 +423,7 @@ DWORD WINAPI GetFileResource16( LPCSTR lpszFileName, LPCSTR lpszResType, ...@@ -423,7 +423,7 @@ DWORD WINAPI GetFileResource16( LPCSTR lpszFileName, LPCSTR lpszResType,
dwFileOffset, dwResLen, lpvData ); dwFileOffset, dwResLen, lpvData );
lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ ); lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ );
if ( lzfd == 0 ) return 0; if ( lzfd < 0 ) return 0;
if ( !dwFileOffset ) if ( !dwFileOffset )
{ {
......
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