ole32: Reread the stream entry after setting the size in StreamWriteAt.

In simple mode, StreamWriteAt would assume that StreamSetSize uses the size
it asks for, but in some cases the size would be pushed above the small block
limit. StreamWriteAt would then attempt to write using a small block chain,
even though a big block chain was created.
This commit is contained in:
Vincent Povirk 2009-12-19 14:20:02 -06:00 committed by Alexandre Julliard
parent fc50ff07d6
commit b3511ebb70

View File

@ -2475,7 +2475,8 @@ static HRESULT StorageImpl_StreamWriteAt(StorageBaseImpl *base, DirRef index,
if (FAILED(hr))
return hr;
data.size = newSize;
hr = StorageImpl_ReadDirEntry(This, index, &data);
if (FAILED(hr)) return hr;
}
if (data.size.QuadPart < LIMIT_TO_USE_SMALL_BLOCK)