Allocate a DOS handle if we open a normal file with LZOpenFile16.

This commit is contained in:
Marcus Meissner 1999-01-26 16:51:15 +00:00 committed by Alexandre Julliard
parent 6e95399049
commit 01c7ee2f45
1 changed files with 8 additions and 1 deletions

View File

@ -540,7 +540,14 @@ static LPSTR LZEXPAND_MangleName( LPCSTR fn )
*/
HFILE16 WINAPI LZOpenFile16( LPCSTR fn, LPOFSTRUCT ofs, UINT16 mode )
{
return LZOpenFile32A( fn, ofs, mode );
HFILE32 hfret;
hfret = LZOpenFile32A( fn, ofs, mode );
/* return errors and LZ handles unmodified */
if (IS_LZ_HANDLE(hfret) || (hfret>=0xfff0) || (hfret<=0))
return hfret;
/* but allocate a dos handle for 'normal' files */
return FILE_AllocDosHandle(hfret);
}