Commit 61f3c740 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

Fixed OpenFile returned value when OF_EXIST flag is specified.

parent ea785755
......@@ -1122,9 +1122,12 @@ success: /* We get here if the open was successful */
TRACE("(%s): OK, return = %p\n", name, handle );
if (win32)
{
hFileRet = (HFILE)handle;
if (mode & OF_EXIST) /* Return the handle, but close it first */
if (mode & OF_EXIST) /* Return TRUE instead of a handle */
{
CloseHandle( handle );
hFileRet = TRUE;
}
else hFileRet = (HFILE)handle;
}
else
{
......
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