diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c index 332ee8ab7b2..60cbb8849f6 100644 --- a/dlls/ole32/stg_stream.c +++ b/dlls/ole32/stg_stream.c @@ -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; diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 3991b9ee30f..e7a8c7333bd 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -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;