Commit cc4ad353 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

ole32: FileLockBytesImpl_WriteAt() should return STG_E_WRITEFAULT for write errors.

parent 6144bae7
......@@ -265,14 +265,14 @@ static HRESULT WINAPI FileLockBytesImpl_WriteAt(
ret = SetFilePointerEx(This->hfile, offset, NULL, FILE_BEGIN);
if (!ret)
return STG_E_READFAULT;
return STG_E_WRITEFAULT;
while (bytes_left)
{
ret = WriteFile(This->hfile, writePtr, bytes_left, &cbWritten, NULL);
if (!ret)
return STG_E_READFAULT;
return STG_E_WRITEFAULT;
if (pcbWritten)
*pcbWritten += cbWritten;
......
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