From 50ea1101c8e7cbf5a9d73addc4eff798843d86e1 Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Tue, 2 Jan 2001 19:56:21 +0000 Subject: [PATCH] Code was checking for 0 or HFILE_ERROR instead of negative error values. --- dlls/version/install.c | 2 +- dlls/version/resource.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/version/install.c b/dlls/version/install.c index 60cda7c56f0..fb4ae91bbb2 100644 --- a/dlls/version/install.c +++ b/dlls/version/install.c @@ -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; diff --git a/dlls/version/resource.c b/dlls/version/resource.c index d8a25b436af..4a526431392 100644 --- a/dlls/version/resource.c +++ b/dlls/version/resource.c @@ -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 ) {