I don't think this should fail if size equals 0. This function is also
used by StgStreamImpl_Read and it shouldn't fail if it reads 0 bytes.

I think a better place to fix it is in the SmallBlocksToBigBlocks() loop.

/Ulrich

On Mon, Dec 26, 2005 at 09:26:58AM -0500, Howard Selover III wrote:
> ChangeLog:
>        Howard Selover III <[EMAIL PROTECTED]>
>        Added back the end of read detection to eliminate a spin condition.
> 
> 
> Index: dlls/ole32/storage32.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/ole32/storage32.c,v
> retrieving revision 1.97
> diff -u -p -r1.97 storage32.c
> --- dlls/ole32/storage32.c      22 Dec 2005 17:12:52 -0000      1.97
> +++ dlls/ole32/storage32.c      26 Dec 2005 01:47:44 -0000
> @@ -5188,6 +5188,9 @@ HRESULT SmallBlockChainStream_ReadAt(
>     offsetInBlock = 0;  /* There is no offset on the next block */
>   }
> 
> +  if (size == 0)
> +    rc = E_FAIL;
> +
>   return rc;
> }
> 
> 
> 
> 


Reply via email to