Commit df6115ae authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

ole32: Do not fail if partial blocks are read.

parent 57d0efa4
...@@ -6226,7 +6226,8 @@ HRESULT BlockChainStream_ReadAt(BlockChainStream* This, ...@@ -6226,7 +6226,8 @@ HRESULT BlockChainStream_ReadAt(BlockChainStream* This,
{ {
if (!cachedBlock->read) if (!cachedBlock->read)
{ {
if (FAILED(StorageImpl_ReadBigBlock(This->parentStorage, cachedBlock->sector, cachedBlock->data, NULL))) ULONG read;
if (FAILED(StorageImpl_ReadBigBlock(This->parentStorage, cachedBlock->sector, cachedBlock->data, &read)) && !read)
return STG_E_READFAULT; return STG_E_READFAULT;
cachedBlock->read = 1; cachedBlock->read = 1;
...@@ -6310,7 +6311,8 @@ HRESULT BlockChainStream_WriteAt(BlockChainStream* This, ...@@ -6310,7 +6311,8 @@ HRESULT BlockChainStream_WriteAt(BlockChainStream* This,
{ {
if (!cachedBlock->read && bytesToWrite != This->parentStorage->bigBlockSize) if (!cachedBlock->read && bytesToWrite != This->parentStorage->bigBlockSize)
{ {
if (FAILED(StorageImpl_ReadBigBlock(This->parentStorage, cachedBlock->sector, cachedBlock->data, NULL))) ULONG read;
if (FAILED(StorageImpl_ReadBigBlock(This->parentStorage, cachedBlock->sector, cachedBlock->data, &read)) && !read)
return STG_E_READFAULT; return STG_E_READFAULT;
} }
......
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