Commit 01c7ee2f authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

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

parent 6e953990
......@@ -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);
}
......
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