Commit b6dc718c authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

ole32: Check the current storage for STGM_SIMPLE rather than ancestorStorage.

Since simple mode does not support substorages, we know these are the same.
parent cf5e6c57
......@@ -575,7 +575,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize(
}
/* In simple mode keep the stream size above the small block limit */
if (This->parentStorage->ancestorStorage->base.openFlags & STGM_SIMPLE)
if (This->parentStorage->openFlags & STGM_SIMPLE)
libNewSize.u.LowPart = max(libNewSize.u.LowPart, LIMIT_TO_USE_SMALL_BLOCK);
if (This->streamSize.u.LowPart == libNewSize.u.LowPart)
......@@ -868,7 +868,7 @@ static HRESULT WINAPI StgStreamImpl_Stat(
pstatstg->grfMode = This->grfMode;
/* In simple create mode cbSize is the current pos */
if((root->base.openFlags & STGM_SIMPLE) && root->create)
if((This->parentStorage->openFlags & STGM_SIMPLE) && root->create)
pstatstg->cbSize = This->currentPosition;
return S_OK;
......
......@@ -866,7 +866,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
return STG_E_ACCESSDENIED;
}
if(This->ancestorStorage->base.openFlags & STGM_SIMPLE)
if(This->openFlags & STGM_SIMPLE)
if(grfMode & STGM_CREATE) return STG_E_INVALIDFLAG;
*ppstm = 0;
......
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