Aric Stewart : ole32: Do not fail if partial blocks are read.

Alexandre Julliard julliard at winehq.org
Mon Jun 17 14:07:47 CDT 2013


Module: wine
Branch: master
Commit: df6115aea65c0931c2d579ece8ac15c1dcb113c1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=df6115aea65c0931c2d579ece8ac15c1dcb113c1

Author: Aric Stewart <aric at codeweavers.com>
Date:   Mon Jun 17 11:28:42 2013 -0500

ole32: Do not fail if partial blocks are read.

---

 dlls/ole32/storage32.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 5009127..bd076ce 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -6226,7 +6226,8 @@ HRESULT BlockChainStream_ReadAt(BlockChainStream* This,
     {
       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;
 
         cachedBlock->read = 1;
@@ -6310,7 +6311,8 @@ HRESULT BlockChainStream_WriteAt(BlockChainStream* This,
     {
       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;
       }
 




More information about the wine-cvs mailing list